anova1way.F.bal | R Documentation |
This function performs power and sample size calculations for the overall (omnibus) F test in a balanced (equal-sized groups) one-way analysis of variance (ANOVA). Can be used to solve for power, n (sample size per group), or alpha. For an unbalanced one-way ANOVA F test (that is, unequal group sample sizes), use 'anova1way.F.unbal'. For contrast tests in a one-way ANOVA, see 'anova1way.c.bal' and 'anova1way.c.unbal'.
anova1way.F.bal(
n = NULL,
mvec = NULL,
sd = 1,
Rsq = 0,
ncov = 0,
alpha = 0.05,
power = NULL,
v = FALSE
)
n |
The sample size per group. |
mvec |
A vector of group means c(mu1, mu2, ...). |
sd |
The estimated standard deviation within each group; defaults to 1. |
Rsq |
The estimated R^2 for regressing the outcome on the covariates; defaults to 0. |
ncov |
The number of covariates adjusted for in the model; defaults to 0. |
alpha |
The significance level or type 1 error rate; defaults to 0.05. |
power |
The specified level of power. |
v |
Either TRUE for verbose output or FALSE to output computed argument only. |
A list of the arguments (including the computed one).
anova1way.F.bal(n = 20, mvec = c(5, 10, 12), sd = 10)
anova1way.F.bal(n = NULL, mvec = c(-0.25, 0.25), sd = 1, Rsq = 0.5^2, ncov = 1, power = 0.8)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.