Multi-factor ANOVA.
Easily perform multi-factor ANOVA (between-subjects, within-subjects, and mixed designs), with or without covariates (ANCOVA).
This function is based on and extends the afex::aov_ez()
function.
You only need to specify the data, dependent variable(s), and factors (between-subjects and/or within-subjects).
Almost all results you need will be displayed in an elegant manner, including effect sizes (partial η^2) and their confidence intervals (CIs).
90% CIs for partial η^2 are reported, following the suggestion by Steiger (2004).
MANOVA( data, subID = NULL, dv = NULL, dvs = NULL, dvs.pattern = "", between = NULL, within = NULL, covariate = NULL, sph.correction = "none", which.observed = NULL, nsmall = 2 )
data |
Data frame. Both long-format and wide-format can be used.
|
subID |
Subject ID.
|
dv |
Variable name of dependent variable.
|
dvs |
[only for "wide-format" data and designs with repeated measures] Variable names of repeated measures.
|
dvs.pattern |
[only for "wide-format" data and designs with repeated measures] If you set Examples:
Tips on regular expression:
|
between |
Between-subjects factors. Character string (e.g., |
within |
Within-subjects factors. Character string (e.g., |
covariate |
Covariates (if necessary). Character string (e.g., |
sph.correction |
[only effective for repeated measures with >= 3 levels] Sphericity correction method to adjust the degrees of freedom (df) when the sphericity assumption is violated. Default is |
which.observed |
[only effective for computing generalized η^2] Factors that are observed or measured (e.g., gender, age group, measured covariates) but not experimentally manipulated. Default is |
nsmall |
Number of decimal places of output. Default is 2. |
A result object returned by afex::aov_ez()
.
Olejnik, S., & Algina, J. (2003). Generalized eta and omega squared statistics: Measures of effect size for some common research designs. Psychological Methods, 8(4), 434-447. doi: 10.1037/1082-989X.8.4.434
Steiger, J. H. (2004). Beyond the F test: Effect size confidence intervals and tests of close fit in the analysis of variance and contrast analysis. Psychological Methods, 9(2), 164-182. doi: 10.1037/1082-989X.9.2.164
#### Between-Subjects Design #### between.1 MANOVA(data=between.1, dv="SCORE", between="A") between.2 MANOVA(data=between.2, dv="SCORE", between=c("A", "B")) between.3 MANOVA(data=between.3, dv="SCORE", between=c("A", "B", "C")) #### Within-Subjects Design #### within.1 MANOVA(data=within.1, dvs="A1:A4", dvs.pattern="A(.)", within="A") ## the same: MANOVA(data=within.1, dvs=c("A1", "A2", "A3", "A4"), dvs.pattern="A(.)", within="MyFactor") # renamed the within-subjects factor within.2 MANOVA(data=within.2, dvs="A1B1:A2B3", dvs.pattern="A(.)B(.)", within=c("A", "B")) within.3 MANOVA(data=within.3, dvs="A1B1C1:A2B2C2", dvs.pattern="A(.)B(.)C(.)", within=c("A", "B", "C")) #### Mixed Design #### mixed.2_1b1w MANOVA(data=mixed.2_1b1w, dvs="B1:B3", dvs.pattern="B(.)", between="A", within="B") MANOVA(data=mixed.2_1b1w, dvs="B1:B3", dvs.pattern="B(.)", between="A", within="B", sph.correction="GG") mixed.3_1b2w MANOVA(data=mixed.3_1b2w, dvs="B1C1:B2C2", dvs.pattern="B(.)C(.)", between="A", within=c("B", "C")) mixed.3_2b1w MANOVA(data=mixed.3_2b1w, dvs="B1:B2", dvs.pattern="B(.)", between=c("A", "C"), within="B") #### Other Examples #### data.new=mixed.3_1b2w names(data.new)=c("Group", "Cond_01", "Cond_02", "Cond_03", "Cond_04") MANOVA(data=data.new, dvs="Cond_01:Cond_04", dvs.pattern="Cond_(..)", between="Group", within="Condition") # renamed the within-subjects factor ?afex::obk.long MANOVA(data=afex::obk.long, subID="id", dv="value", between=c("treatment", "gender"), within=c("phase", "hour"), cov="age", sph.correction="GG")
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.