pilotr (Python)¶
Simulate experimental and behavioural data from a portable JSON design specification.
This is the feature-parity twin of the R package of
the same name. The two share the design specification and the random-number generator, so the
same specification and seed produce identical data in either language, bit for bit apart from a
documented tolerance of a few units in the last place where an unrounded response family applies
exp() or log() to the linear predictor.
Get started Try the no-code app
A design specification names the units, the factors and their contrasts, the fixed effect sizes, any random effects and a response family. From that one file pilotr draws a data set, estimates power and precision by simulation, then emits the analysis code the design implies. The same file drives the R package, the browser-based no-code app and this Python package, so a design built by pointing and clicking can be run unchanged in a script, and a design written in a script can be handed to a collaborator who has installed nothing.
The generative core is pure Python and dependency-free. scipy, statsmodels and pandas are
optional extras, needed only by the power tools. The Get started guide
covers installing pilotr and simulating a first data set.
Where to go next¶
The guides follow the workflow, from choosing a response family to sizing a study and checking that the two languages agree.
- Response families: Gaussian, lognormal, reaction times, accuracy, counts, ordinal, Beta and the ex-Gaussian.
- Worked examples: one ready-to-run design per family.
- Power and design analysis:
power,power_curveandpower_mixed, withsolve_curveandtarget_nfor the sample size a curve implies. - Cross-language reproducibility: how the same spec gives identical data in R and Python.
- Specification format: the JSON spec and the cross-language RNG contract.
- API reference: every public function and class.