Skip to content

Worked examples

One ready-to-run specification per design family ships with the package. pilotr_example() lists them and returns the path to each for load_spec(), and the same JSON files drive the R package and the no-code app. Each is simulated below, showing the design it describes and the first rows of the data it produces. The specification format is documented on the Specification page.

beta_proportion

Bounded proportions through the Beta family.beta family, 200 rows.

subject group prop
1 control 0.299
2 control 0.54
3 control 0.256
4 control 0.337

between_2group_gaussian

Two-group between-subjects Gaussian.gaussian family, 64 rows.

subject group score
1 control 95.7
2 control 90.1
3 control 119
4 control 86.4

crossed_mixed_rt

Crossed by-subject and by-item reaction times (shifted lognormal).shifted_lognormal family, 1440 rows.

subject item condition RT
1 1 related 669
1 1 unrelated 727
1 2 related 699
1 2 unrelated 503

nested_clusters

Subjects nested in higher-level clusters (an extra grouping factor).gaussian family, 4800 rows.

subject item site condition y
1 1 1 a 0.165
1 1 1 b 2.11
1 2 1 a 0.725
1 2 1 b 1.7

ordinal_likert_between

Five-point Likert responses via a cumulative-logit model.ordinal family, 400 rows.

subject group rating
1 control 2
2 control 4
3 control 3
4 control 3

partial_crossing

Each subject sees a sampled subset of items.gaussian family, 1440 rows.

subject item condition rt
1 3 a 393
1 3 b 532
1 5 a 524
1 5 b 633

poisson_counts_between

Count outcomes through a log link.poisson family, 2000 rows.

subject group count
1 control 3
2 control 5
3 control 3
4 control 9

reading_time_continuous

A continuous predictor with a lognormal reading-time outcome.lognormal family, 4000 rows.

subject item narration SyntaxPC CoherencePC age reading_time_per_word
1 1 off -1.74 -0.0215 0.0633 0.375
1 1 on -1.74 -0.0215 0.0633 0.328
1 2 off -1.89 0.727 0.0633 0.156
1 2 on -1.89 0.727 0.0633 0.232