Package: pilotr 0.3.1

pilotr: Simulate Experimental and Behavioural Data from a Portable Design Specification

Generative simulation of experimental and behavioural data sets from a portable JavaScript Object Notation (JSON) design specification shared with the 'Python' package of the same name. Supports user-specified fixed effect sizes, crossed by-subject and by-item random intercepts and slopes, predictors measured with error, realistic response families (Gaussian, lognormal, shifted lognormal, ex-Gaussian, Bernoulli, Poisson, ordinal and Beta), and simulation-based power and precision-based design analysis, including the Type S and Type M errors of Gelman and Carlin (2014) <doi:10.1177/1745691614551642> and a region of practical equivalence. A shared cross-language random-number generator means that, given the same specification and seed, the R and 'Python' implementations produce identical data: exactly for the Gaussian family and for any family with rounding set, and to within the last unit in the last place for families applying a transcendental function to the linear predictor, whose rounding the IEEE-754 standard does not fix.

Authors:Pablo Bernabeu [aut, cre]

pilotr_0.3.1.tar.gz
pilotr_0.3.1.zip(r-4.7-any)pilotr_0.3.1.zip(r-4.6-any)pilotr_0.3.1.zip(r-4.5-any)
pilotr_0.3.1.tgz(r-4.6-any)pilotr_0.3.1.tgz(r-4.5-any)
pilotr_0.3.1.tar.gz(r-4.7-any)pilotr_0.3.1.tar.gz(r-4.6-any)
pilotr_0.3.1.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
pilotr/json (API)

# Install 'pilotr' in R:
install.packages('pilotr', repos = c('https://pablobernabeu.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/pablobernabeu/pilotr/issues

Pkgdown/docs site:https://pablobernabeu.github.io

On CRAN:

Conda:

3.99 score 14 scripts 101 downloads 28 exports 1 dependencies

Last updated from:6e838c4fdf. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK184
source / vignettesOK223
linux-releaseOK147
macos-releaseOK156
macos-oldrelOK144
windows-develOK115
windows-releaseOK82
windows-oldrelOK99
wasm-releaseOK141

Exports:as241brms_bridgebuild_speccalibrate_responsedefault_response_namedesign_conditionsgenerate_design_analysisgenerate_r_scriptload_specmake_rngmodel_datamodel_formulapilotr_examplepower_curve_mixedpower_designpower_mixedprecision_curveprecision_designreplicate_seedsresponse_variancerun_appsimulate_designsolve_curvespec_from_modelspec_jsonsweep_spectarget_nvalidate_spec

Dependencies:jsonlite

Cross-language reproducibility
The challenge | A shared generator | Determinism in R | The same design in Python | The analysis layer | Why this matters

Last update: 2026-09-12
Started: 2026-09-12

Getting started with pilotr
One specification, three interfaces | Describe a design | Simulate | Reproducible by construction | Export a self-contained script | Where to go next

Last update: 2026-09-12
Started: 2026-09-12

Power and design analysis
Two-group Gaussian | Crossed mixed-effects designs | A power curve | The sample size the curve implies | Parallel execution | A bridge to the Bayesian workflow | See also

Last update: 2026-09-12
Started: 2026-09-12

Precision and ROPE design analysis
The idea | A worked design | Precision at a fixed N | Sweeping sample size | See also

Last update: 2026-09-12
Started: 2026-09-12

Response families
Gaussian | Shifted lognormal (reaction times) | Lognormal (positive continuous) | Bernoulli (accuracy) | Poisson (counts) | Ordinal (Likert) | Beta (proportions) | Choosing a family | Writing the specification directly

Last update: 2026-09-12
Started: 2026-09-12

The no-code app
Two ways to run it | What the app does | One specification, three interfaces

Last update: 2026-09-12
Started: 2026-09-12

Worked examples

Last update: 2026-09-12
Started: 2026-09-12

Readme and manuals

Help Manual

Help pageTopics
pilotr: Simulate Experimental and Behavioural Data from a Portable Design Specificationpilotr-package pilotr
Inverse normal cumulative distribution function (Wichura's AS 241)as241
Derive a brms formula, family, and priors from a design specbrms_bridge
Build a design specification from a flat list of design inputsbuild_spec
Rescale a design to a target total variancecalibrate_response
Default response-column name for a familydefault_response_name
Build a grid of fixed-effect coefficient setsdesign_conditions
Generate a Bayesian design-analysis script from a specificationgenerate_design_analysis
Generate a self-contained, reproducible R script from a specificationgenerate_r_script
Load a design specification from a JSON fileload_spec
Create a shared cross-language random-number generatormake_rng
Build the modelling data frame from a simulated data set and its specificationmodel_data
Derive the lmer formula implied by a specificationmodel_formula
Example design specifications shipped with pilotrpilotr_example
Power curve over sample size for a mixed-effects designpower_curve_mixed
Simulation-based power and design analysis for a two-group Gaussian designpower_design
Simulation-based power and design analysis for a mixed-effects designpower_mixed
Precision and ROPE curve over sample sizeprecision_curve
Precision and ROPE design analysis at a fixed sample sizeprecision_design
Print a brms bridgeprint.pilotr_bridge
Print a simulation-based power resultprint.pilotr_power
Seeds for the replicates of a Monte Carlo runreplicate_seeds
Variance components of the linear predictorresponse_variance
Launch the pilotr no-code apprun_app
Simulate a data set from a design specificationsimulate_design
Solve a simulated design curve for the value that meets a targetsolve_curve
Build a design specification from a fitted mixed modelspec_from_model
Serialise a design specification to pretty-printed JSONspec_json
Sweep an analysis over one field of a design specificationsweep_spec
Solve a power curve for the sample size that reaches a target powertarget_n
Validate a design specificationvalidate_spec