powerCurve | R Documentation |
This function runs powerSim
over a range of sample sizes.
powerCurve(
fit,
test = fixed(getDefaultXname(fit)),
sim = fit,
along = getDefaultXname(fit),
within,
breaks,
seed,
fitOpts = list(),
testOpts = list(),
simOpts = list(),
...
)
fit |
a fitted model object (see |
test |
specify the test to perform. By default, the first fixed effect in |
sim |
an object to simulate from. By default this is the same as |
along |
the name of an explanatory variable. This variable will have its number of levels varied. |
within |
names of grouping variables, separated by "+" or ",". Each combination of groups will be
extended to |
breaks |
number of levels of the variable specified by |
seed |
specify a random number generator seed, for reproducible results. |
fitOpts |
extra arguments for |
testOpts |
extra arguments for |
simOpts |
extra arguments for |
... |
any additional arguments are passed on to
|
print.powerCurve
, summary.powerCurve
, confint.powerCurve
## Not run:
fm <- lmer(y ~ x + (1|g), data=simdata)
pc1 <- powerCurve(fm)
pc2 <- powerCurve(fm, breaks=c(4,6,8,10))
print(pc2)
plot(pc2)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.