View source: R/meta_functions.R
mixedpower | R Documentation |
mixedpower()
combines a databased and SESOI (smallest effect of interest)
simulation for one specified random effect
mixedpower(
model,
data,
fixed_effects,
simvar,
steps,
critical_value,
n_sim = 1000,
SESOI = F,
databased = T,
maxCores = NULL
)
model |
lme4 model: mixed model of interest |
data |
data frame: data used to fit the mixed model of interest |
fixed_effects |
vector of character elements: names of variables that are used as fixed effects in the used model |
simvar |
character element: name of the variable that contains the random effect we want to simulate along (e.g. subject number or stimuli number) in the used data frame |
steps |
vector of integers: steps of "simvar" you want to test power of (e.g. different sample sizes) |
critical_value |
integer: z/t value to test if a given fixed effect is significant. This can be a single value or a vector containing specific critical values for each effect |
n_sim |
integer: number of simulations to run |
SESOI |
vector with floatsĀ“indicating the desired SESOIs. If FALSE, no SESOI simulation is run. |
databased |
logical value: indicates whether databased power simulation shoul be run |
maxCores |
allows to specify the maximum number of cores to be used in simulation process. If unspecified, mixedpower will run simulations on all but one cores. |
A modified mixed model
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.