View source: R/meta_functions.R
mixedpowerSR | R Documentation |
mixedpower()
combines all three power options (databased, safeguard,
rnorm). It runs them all by default and returns a data frame with results
for all three options.
mixedpowerSR(
model,
data,
fixed_effects,
simvar,
steps,
critical_value,
n_sim = 1000,
confidence_level = 0.68,
databased = T,
safeguard = F,
rnorm = F
)
model |
lme4 model: mixed model of interest |
data |
data frame: pilot data that fits the mixed model of interest |
fixed_effects |
vector of character elements: names of variables that are used as fixed effects in model emp |
simvar |
charackter element: name of the variable that contains the random effect we want to simulate along (e.g. subject number or stimuli number) in data |
steps |
vector of integers: steps for "simvar" you want to test power of |
critical_value |
integer: z/t value to test if a given fixed effect is significant |
n_sim |
integer: number of simulations to run |
confidence_level |
float: value between 0-1 indicating the width of the confidence interval used for the safeguard option |
databased |
logical value: indicates whether databased power simulation shoul be run |
safeguard |
logical value: indicates whether safeguard power simulation shoul be run |
rnorm |
logical value: indicates whether rnorm power simulation shoul be run |
A modified mixed model
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.