View source: R/power_calculation.R
| pwr.anova | R Documentation |
Calculates the statistical power for testing the overall effects of treatment factors and their interactions, i.e., power of F-test.
pwr.anova(object, sig.level = 0.05, type = c("III", "II", "I", "3", "2", "1"))
object |
a design object created in pwr4exp |
sig.level |
significance level, default 0.05 |
type |
the type of ANOVA table requested, default Type III |
a data frame with numerator degrees of freedom (NumDF), denominator
degrees of freedom (DenDF), type I error rate (sig.level), and power.
mkdesign, designCRD, designRCBD, designLSD, designCOD, designSPD, pwr.summary and pwr.contrast
# generate an RCBD
rcbd <- designRCBD(
treatments = c(2, 2),
label = list(facA = c("1", "2"), facB = c("1", "2")),
blocks = 12,
formula = ~ facA*facB + (1|block),
means = c(32, 35, 30, 37),
vcomp = 4,
sigma2 = 6
)
# power of omnibus test
pwr.anova(rcbd)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.