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.
Try it without installing
A serverless build runs entirely in your browser, with no installation required and no data uploaded. It is available as a no-code app.
Learn more
The Python documentation site walks through the quick start, the response families, power and design analysis, the specification format and the API reference. The full repository, including the R package and the no-code app, is at https://github.com/pablobernabeu/pilotr.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pilotr-0.2.0.tar.gz.
File metadata
- Download URL: pilotr-0.2.0.tar.gz
- Upload date:
- Size: 20.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ae9e8d8fb203f1d24d293479374f8ac387dab4c6e8ee8c966870d20eaafe759
|
|
| MD5 |
f5ea7af3a65ab6b25de5d79593a97030
|
|
| BLAKE2b-256 |
df3e4a7951a2938586f04e3a5f6ba1927d74dc7263c4ad3bd55de9e82ac99177
|
Provenance
The following attestation bundles were made for pilotr-0.2.0.tar.gz:
Publisher:
publish.yml on pablobernabeu/pilotr
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pilotr-0.2.0.tar.gz -
Subject digest:
3ae9e8d8fb203f1d24d293479374f8ac387dab4c6e8ee8c966870d20eaafe759 - Sigstore transparency entry: 2170927189
- Sigstore integration time:
-
Permalink:
pablobernabeu/pilotr@a04080c4b9c4ec328b944e88b317f02af64f16eb -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/pablobernabeu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a04080c4b9c4ec328b944e88b317f02af64f16eb -
Trigger Event:
release
-
Statement type:
File details
Details for the file pilotr-0.2.0-py3-none-any.whl.
File metadata
- Download URL: pilotr-0.2.0-py3-none-any.whl
- Upload date:
- Size: 20.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
117cb695e068cb2368b472a5233a1116b858419cfb3571b69b05bc97b2e2275c
|
|
| MD5 |
5c7aed5f6e010bd8ec797d3764434759
|
|
| BLAKE2b-256 |
0d120ba115e331fca01e2e65abee7a9a4d32bd02c757dcae65924576e601356f
|
Provenance
The following attestation bundles were made for pilotr-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on pablobernabeu/pilotr
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pilotr-0.2.0-py3-none-any.whl -
Subject digest:
117cb695e068cb2368b472a5233a1116b858419cfb3571b69b05bc97b2e2275c - Sigstore transparency entry: 2170927193
- Sigstore integration time:
-
Permalink:
pablobernabeu/pilotr@a04080c4b9c4ec328b944e88b317f02af64f16eb -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/pablobernabeu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a04080c4b9c4ec328b944e88b317f02af64f16eb -
Trigger Event:
release
-
Statement type: