Use Simulated Data to Test the Power of Your Research Design
Source:R/simulate_design_power.R
simulate_design_power.Rd
Uses your simulation code, a vector of potential sample sizes and your a priori assumption of the effect size to estimate the power of your research design.
Usage
simulate_design_power(
d,
protocol,
input_sim_func,
range_n,
effect_size,
runs = 100,
input_sim_params = NULL
)
Arguments
- d
A character vector of the research design steps function names
- protocol
A list of
choice
s for thestep
s of thedesign
- input_sim_func
A function that, when called, will return a simulated input to the first step for the function. See Details section for further information.
- range_n
A vector containing the differnt sample sizes for which you wan to estimate the power of your design.
- effect_size
The effect size that you want your simulated data to reflect.
- runs
How many runs do you want to simulate to estimate you power?
- input_sim_params
If your
input_sim_func
needs additional parameters besidesn
andeffect_size
you can provide a list of them here.
Value
A data frame containing the output
of the last step
of the design
along with the simulation parameters,
Details
The function provided via input_sim_func
needs to take a sample size parameter and an
effect size parameter as the first two input parameters.
See the vignette of the package for additional information on how to implement the RDF analysis
workfow.
Examples
if (FALSE) {
print("Sorry. No examples yet.")
}