Skip to main content

Simulate experimental and behavioural data from a portable design specification (cross-language with the R package of the same name).

Project description

pilotr (Python)

Python implementation of pilotr. It simulates experimental and behavioural data from a portable JSON design specification, producing output that is bit-identical to the R package of the same name. See the project README for the full toolkit (the no-code app, the R package and the specification format).

Install

pip install pilotr             # core engine (pure Python, dependency-free)
pip install "pilotr[power]"    # + scipy, for the simulation-based power demo

Requires Python 3.9 or later; the generative core has no dependencies.

For development, install from a checkout of the repository instead: clone https://github.com/pablobernabeu/pilotr and run pip install . (or pip install ".[dev]") from the python directory.

Quick start

from pilotr import simulate

spec = {
    "name": "two_group", "seed": 2024,
    "units": {"subject": {"n": 64}},
    "factors": [{"name": "group", "levels": ["control", "treatment"],
                 "contrasts": {"effect": [-0.5, 0.5]}, "between": "subject"}],
    "fixed": {"intercept": 100, "coefficients": {"effect": 5}},
    "response": {"family": "gaussian", "name": "score", "sigma": 10},
}

data = simulate(spec)               # 64 rows

Given the same specification and seed, this reproduces the data generated by the R package to full floating-point precision.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pilotr-0.1.0.tar.gz (17.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pilotr-0.1.0-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file pilotr-0.1.0.tar.gz.

File metadata

  • Download URL: pilotr-0.1.0.tar.gz
  • Upload date:
  • Size: 17.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pilotr-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3c12d98b542cf152520c22d78c044af3222d9a644103344d3b8b85b8daaddfdd
MD5 6662babeba5e23dc23c6757d4fd02a82
BLAKE2b-256 8129d9a758e08c8797272ea48ca4c73b16014ef9bd06823deb81609df6a138d4

See more details on using hashes here.

Provenance

The following attestation bundles were made for pilotr-0.1.0.tar.gz:

Publisher: publish.yml on pablobernabeu/pilotr

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pilotr-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pilotr-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pilotr-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 450ebca7922019cd5ff5a3f0891b6a5cce70ca0da91ad6eaa8d19ea95f4dc806
MD5 c3e5cae3bf2d243134698fb8074cfa79
BLAKE2b-256 b64aba465131cc69659ce1eebcb3b2ff915449029d5da21ffa91f920946fbd32

See more details on using hashes here.

Provenance

The following attestation bundles were made for pilotr-0.1.0-py3-none-any.whl:

Publisher: publish.yml on pablobernabeu/pilotr

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page