View source: R/getDesignMeans.R
getDesignTwoWayANOVA | R Documentation |
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
)
beta |
The type II error. |
n |
The total sample size. |
nlevelsA |
The number of groups for Factor A. |
nlevelsB |
The number of levels for Factor B. |
means |
The matrix of treatment means for Factors A and B combination. |
stDev |
The common standard deviation. |
rounding |
Whether to round up sample size. Defaults to 1 for sample size rounding. |
alpha |
The two-sided significance level. Defaults to 0.05. |
An S3 class designTwoWayANOVA
object with the following
components:
alpha
: The two-sided significance level.
nlevelsA
: The number of levels for Factor A.
nlevelsB
: The number of levels for Factor B.
means
: The matrix of treatment group means.
stDev
: The common standard deviation.
effectsizeA
: The effect size for Factor A.
effectsizeB
: The effect size for Factor B.
effectsizeAB
: The effect size for Factor A and Factor B
interaction.
rounding
: Whether to round up sample size.
powerdf
: The data frame containing the power and sample size
results. It has the following variables:
n
: The sample size.
powerA
: The power to reject the null hypothesis that
there is no difference among Factor A levels.
powerB
: The power to reject the null hypothesis that
there is no difference among Factor B levels.
powerAB
: The power to reject the null hypothesis that
there is no interaction between Factor A and Factor B.
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.