Perform a power analysis for a mixed model.
powerSim(fit, test = fixed(getDefaultXname(fit)), sim = fit, fitOpts = list(), testOpts = list(), simOpts = list(), seed, ...)
a fitted model object (see doFit).
doFit
specify the test to perform. By default, the first fixed effect in fit will be tested. (see: tests).
fit
an object to simulate from. By default this is the same as fit (see doSim).
doSim
extra arguments for doFit.
extra arguments for doTest.
doTest
extra arguments for doSim.
specify a random number generator seed, for reproducible results.
any additional arguments are passed on to simrOptions. Common options include:
simrOptions
nsim
the number of simulations to run (default is 1000).
1000
alpha
the significance level for the statistical test (default is 0.05).
0.05
progress
use progress bars during calculations (default is TRUE).
TRUE
print.powerSim, summary.powerSim, confint.powerSim
print.powerSim
summary.powerSim
confint.powerSim
# NOT RUN { fm1 <- lmer(y ~ x + (1|g), data=simdata) powerSim(fm1, nsim=10) # }
Run the code above in your browser using DataLab