One-Way ANOVA
The Analysis of Variance (ANOVA) is used to explore the relationship between a continuous dependent variable, and one or more categorical explanatory variables. This 'One-Way ANOVA' is a simplified version of the 'normal' ANOVA, allowing only a single explanatory factor, however also providing a Welch's ANOVA. The Welch's ANOVA has the advantage that it need not assume that the variances of all groups are equal.
anovaOneW( data, deps, group, welchs = TRUE, fishers = FALSE, miss = "perAnalysis", desc = FALSE, descPlot = FALSE, norm = FALSE, qq = FALSE, eqv = FALSE, phMethod = "none", phMeanDif = TRUE, phSig = TRUE, phTest = FALSE, phFlag = FALSE, formula )
data |
the data as a data frame |
deps |
a string naming the dependent variables in |
group |
a string naming the grouping or independent variable in
|
welchs |
|
fishers |
|
miss |
|
desc |
|
descPlot |
|
norm |
|
qq |
|
eqv |
|
phMethod |
|
phMeanDif |
|
phSig |
|
phTest |
|
phFlag |
|
formula |
(optional) the formula to use, see the examples |
For convenience, this method allows specifying multiple dependent variables, resulting in multiple independent tests.
Note that the Welch's ANOVA is the same procedure as the Welch's independent samples t-test.
A results object containing:
results$anova |
a table of the test results | ||||
results$desc |
a table containing the group descriptives | ||||
results$assump$norm |
a table containing the normality tests | ||||
results$assump$eqv |
a table of homogeneity of variances tests | ||||
results$plots |
an array of groups of plots | ||||
results$postHoc |
an array of post-hoc tables | ||||
Tables can be converted to data frames with asDF
or as.data.frame
. For example:
results$anova$asDF
as.data.frame(results$anova)
data('ToothGrowth') dat <- ToothGrowth dat$dose <- factor(dat$dose) anovaOneW(formula = len ~ dose, data = dat) # # ONE-WAY ANOVA # # One-Way ANOVA (Welch's) # ---------------------------------------- # F df1 df2 p # ---------------------------------------- # len 68.4 2 37.7 < .001 # ---------------------------------------- #
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.