Description Usage Arguments Details Examples
This function computes power for multilevel models, generalized estimating equations, and litter means. For multilevel models, power for the treatment and litter effects can be caluculated.
1 2 | prospective_power(nsims, delta_t, icc, v_overall, n_litters, pups_litter,
method, parameter = "treatment", correction = "d5")
|
nsims |
number of iterations. Should be > 1,000, but smaller values can build intution for expected power |
delta_t |
standardized effect size. Follows Cohen's guidelines |
icc |
residual variance explained by litter (0 - 0.99) |
v_overall |
total variance in the model |
n_litters |
number of litters (must be even) |
pups_litter |
number of pups per litter (must be even) |
method |
model: "MLM", "GEE", "LM" for litter means |
parameter |
default is "treatment" (see details) |
correction |
bias correction for GEE (see details) "d5" was used in manuscript see saws package documentation for other options |
Power for the litter effect (random intercept) can be calculated by setting the parameter to "litter". Note that computing power for a litter effect is not possible with GEE or LM (litter means). The bias correction is tenatively set to "d5" (what was used in the paper). Further details can be found in bias correction reference section. Note that, in the future, we may remove this default and user will have to select the most approapriate bias correction.
1 2 3 4 5 6 7 8 | example that works
prospective_power(nsims = 20, delta_t = .25, icc = .5, v_overall = 20,
n_litters = 50, pups_litter = 4, method = "GEE",
correction = "d5", parameter = "treatment")
example that results in error (litter means cannot estimate litter effect)
prospective_power(nsims = 20, delta_t = .25, icc = .5, v_overall = 20,
n_litters = 50, pups_litter = 4, method = "LM",
correction = "d5", parameter = "litter")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.