Learn R Programming

pwr4exp (version 1.0.1)

pwr.anova: Power of omnibus tests

Description

Calculates the statistical power for testing the overall effects of treatment factors and their interactions, i.e., power of F-test.

Usage

pwr.anova(object, sig.level = 0.05, type = c("III", "II", "I", "3", "2", "1"))

Value

a data frame with numerator degrees of freedom (NumDF), denominator degrees of freedom (DenDF), type I error rate (sig.level), and power.

Arguments

object

a design object created in pwr4exp

sig.level

significance level, default 0.05

type

the type of ANOVA table requested, default Type III

See Also

mkdesign, designCRD, designRCBD, designLSD, designCOD, designSPD, pwr.summary and pwr.contrast

Examples

Run this code
# 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)

Run the code above in your browser using DataLab