powered by
Obtains the power and sample size for two-way analysis of variance.
getDesignTwoWayANOVA( beta = NA_real_, n = NA_real_, nlevelsA = 2, nlevelsB = 2, means = NA_real_, stDev = 1, rounding = TRUE, alpha = 0.05 )
An S3 class designTwoWayANOVA object with the following components:
designTwoWayANOVA
alpha: The two-sided significance level.
alpha
nlevelsA: The number of levels for Factor A.
nlevelsA
nlevelsB: The number of levels for Factor B.
nlevelsB
means: The matrix of treatment group means.
means
stDev: The common standard deviation.
stDev
effectsizeA: The effect size for Factor A.
effectsizeA
effectsizeB: The effect size for Factor B.
effectsizeB
effectsizeAB: The effect size for Factor A and Factor B interaction.
effectsizeAB
rounding: Whether to round up sample size.
rounding
powerdf: The data frame containing the power and sample size results. It has the following variables:
powerdf
n: The sample size.
n
powerA: The power to reject the null hypothesis that there is no difference among Factor A levels.
powerA
powerB: The power to reject the null hypothesis that there is no difference among Factor B levels.
powerB
powerAB: The power to reject the null hypothesis that there is no interaction between Factor A and Factor B.
powerAB
The type II error.
The total sample size.
The number of groups for Factor A.
The number of levels for Factor B.
The matrix of treatment means for Factors A and B combination.
The common standard deviation.
Whether to round up sample size. Defaults to 1 for sample size rounding.
The two-sided significance level. Defaults to 0.05.
Kaifeng Lu, kaifenglu@gmail.com
(design1 <- getDesignTwoWayANOVA( beta = 0.1, nlevelsA = 2, nlevelsB = 2, means = matrix(c(0.5, 4.7, 0.4, 6.9), 2, 2, byrow = TRUE), stDev = 2, alpha = 0.05))
Run the code above in your browser using DataLab