
Workflow of `power4test()`
Source:vignettes/articles/power4test_workflow.Rmd
power4test_workflow.Rmd
Goal
This technical appendix describes the workflow of
power4test()
in power4mome.
From Population to Power (power4test()
)
The main function power4test()
can do all these tasks in
one call:
Generate
nrep
datasets (nrep
replications) based on a population model and values of the population parameters (“effect sizes”) (conducted bysim_data()
).Fit one or more models to each of the datasets (conducted by
fit_model()
).(Optional) Generate Monte Carlo or bootstrap estimates based on the fitted model(s), for doing tests by methods such as Monte Carlo or bootstrap confidence intervals (conducted by
gen_mc()
andgen_boot()
).(Optional) Do one or more tests on each of the model fit results (conducted by
do_test()
).Return a
power4test()
object.
Power can then be estimated for each of the conducted tests by
functions such as rejection_rates()
.
The following is the workflow:
From Population to Power