Run a built-in simulation scenario
Arguments
- scenario
A single scenario name from
simulation_scenarios().- seed
Optional seed.
Value
The simulab_sim base data.frame returned by the simulator the
scenario calls, whose columns depend on the scenario's family.
Examples
result <- run_simulation_scenario("small_effect", seed = 1)
head(result)
#> <simulab_sim:ttest> 6 rows x 3 columns
#> id group outcome
#> 1 1 A -0.6264538
#> 2 2 A 0.1836433
#> 3 3 A -0.8356286
#> 4 4 A 1.5952808
#> 5 5 A 0.3295078
#> 6 6 A -0.8204684
#>
#> Truth (parameters):
#> group n mean sd
#> 1 A 100 0.0 1
#> 2 B 100 0.2 1
#>
#> Other tables: effects. Read one with as.data.frame(x, what = "effects").