Package: pilotr 0.4.0

Pablo Bernabeu

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 wherever they share a maths library, as on Linux, except in a rare Beta case under R 4.6.0 or later that the cross-language vignette describes. Elsewhere, a value that passes through exp(), log() or pow(), whose rounding the IEEE-754 standard does not fix, can differ in its last bits.

Authors:Pablo Bernabeu [aut, cre]

pilotr_0.4.0.tar.gz
pilotr_0.4.0.zip(r-4.7-any)pilotr_0.4.0.zip(r-4.6-any)
pilotr_0.4.0.tar.gz(r-4.7-any)pilotr_0.4.0.tar.gz(r-4.6-any)
pilotr_0.4.0.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://cran.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:

4.02 score 357 downloads 29 exports 1 dependencies

Last updated from:928cda0a9f. Checks:6 OK. Indexed: no.

TargetResultTimeFilesSyslog
linux-develOK154
source / vignettesOK228
linux-releaseOK168
windows-develOK162
windows-releaseOK110
wasm-releaseOK106

Exports:as241brms_bridgebuild_speccalibrate_responsedefault_response_namedesign_conditionsgenerate_design_analysisgenerate_r_scriptload_specmake_rngmodel_datamodel_formulapilotr_examplepower_curve_mixedpower_designpower_mixedpower_reportprecision_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-11-22
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-11-22
Started: 2026-09-12

Power and design analysis
Two-group Gaussian | Directional predictions | Crossed mixed-effects designs | A preregistered simplification rule | Which model each family gets | A power curve | The sample size the curve implies | A sample-size justification | Subjects and items | Parallel execution | A bridge to the Bayesian workflow | See also

Last update: 2026-11-22
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-11-22
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-11-22
Started: 2026-09-12

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

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

Worked examples

Last update: 2026-11-22
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
Write a sample-size justification from a power resultpower_report print.pilotr_report
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