General Linear Testing in Group Analysis
The assumption of data normality in the analysis of variance (ANOVA) can be frequently violated but usually with minor effects. There are a few other assumptions about group analysis, among which the following two need more attention:
(1) Homogeneity of covariance for between-subjects factor: all levels of the between-subjects factor have the same variance. This is essentially the same assumption in two-sample t test (3dttest) with the same variance assumption of the two samples.
According to David C. Howell, if the population distributions tend to be symmetric, or at least similarly shaped or unidirectionally skewed, and if maximum variance among the populations is less than 4 times the minimum, the consquence of variance heterogeneity, when sample sizes are equal, is not very serious. However, inequality of sample size raises a huge concern if the homogeneity of variance assumption is violated. In case of possible violation of this assumption, try to aviod the possibility of unequal sample sizes.
(2) Sphericity (circularity) for within-subject factor - it requires the homogeneity of variance among the differences between all possible level pairs of the within-subject factor. However, a more useful and more convenient condition is a relatively stronger restriction (sufficient but not necessary): it requires both the homogeneity of variance (all levels of the within-subject factor have equal variance) and the homogeneity of covariance (the correlations are equal among each possible pair of the within-subject factor levels). This stronger restriction is called compound symmetry because the covariance matrix for the within-subject factor levels is symmetrical.
When all assumptions are met all the AFNI ANOVA programs can be safely employed to obtain F statistics for main effects and interactions. Nevertheless, when a contrast or simple effect involves only a portion of the whole dataset, we recommend the following testing principle to reduce the potential risk of sphericity violation:
Any effect involving a portion of the data is tested exclusively based on that portion.
Even if a within-subject factor passes sphericity test, the precautious practice of the above principle generates robust results. When sphericity assumption is violated especially if there is different correlation across factor levels, the above practice is immune to the violation. Therefore simple effects and contrasts, if possible, should be tested with one-sample, two-sample, or paired t test (3dttest). In other words, when appropriate contrasts from individual subject analysis (output of 3dDeconvolve) can be directly brought into group analysis.
In the same spirit we have modified 3dANOVA2 and 3dANOVA3 so that the options of -amean, -bmean, -adiff, -bdiff, -acontr and -bcontr are aligned up with the above principle for one-way within-subject ANOVA (3dANOVA2 -type 3) and two-way within-subject ANOVA (3dANOVA3 -type 4) and two-way mixed-effects ANOVA (3dANOVA3 -type 5). A justification for the modification for simple effect testing (-amean and -bmean) is discussed here. These modifications guard 3dANOVA2 and 3dANOVA3 against any potential risk of sphericity violation as much as possible, and also lift the old constraint (all coeficients should add up to 0) on option -acontr and -bcontr in the two programs. Keep in mind all these modifications on -amean, -bmean, -adiff, -bdiff, -acontr and -bcontr are essentially equivalent to running multiple corresponding t tests with 3dttest. In other words, you could run separate t tests with 3dttest instead of 3dANOVA2 or 3dANOVA3, but the later is definitely much neater with all results bundled in one single output file.
Another fact to notice here is that the tests done through -amean, -bmean, -adiff, and -bdiff are simply special cases for -acontr and -bcontr. Essentially -acontr and -bcontr would be good enough for all general linear tests. So literally -acontr and -bcontr should be more suitably called -glt in the sense all coefficients don't necessarily sum up to 0, comparable to the option in 3dDeconvolve, but we just decided to carry on the notation in 3dANOVA2 and 3dANOVA3.
In fact in the old version of the three ANOVA programs -mean, -diff, and -contr also bear the same underlying formulas: -mean and -diff were special cases of -contr. This was troublesome as demonstrated in Simple Effect testing at Group Level. Moreover, when general linear test coefficients do not add up to 0, the same problem would occur. Let's start with the same one-way within-subject (repeated-measures) ANOVA model (3dANOVA2 -type 3)
Y_{ij} independent variable – regression coefficient (% signal change) from individual subject analysis;
E(Y_{ij}) = μ + α_{i}, Var(Y_{ij}) = σ_{p}^{2} + σ^{2}, Cov(Y_{ij}, Y_{i'j}) = σ_{p}^{2} (i ‡ i'), Cov(Y_{ij},,Y_{i'j'}) = 0 (j ‡ j');
Now consider a general linear null hypothesis H_{0}: Σc_{i}α_{i} = 0. The test in 3dANOVA2 -type 3 was
t = Σc_{i}Y_{i·}/sqrt(Σc_{i}^{2 }MSAS)
where MSAS is the interaction between the factor of interest and subject. As
E(Σc_{i}Y_{i·}) = μΣc_{j},
Var(Σc_{i}Y_{i·}) = (Σc_{i})^{2}σ_{p}^{2} + (Σc_{i}^{2})σ^{2}, E(MSAS) = σ^{2}
-aBcontr c_{1} c_{2}...c_{a} : j contrast_label -- 2nd order contrast in factor A, at fixed B level j
-Abcontr i : c_{1} c_{2}...c_{b} contrast_label -- 2nd order contrast in factor B, at fixed A level i
If sphericity violation is a concern, when there are only two levels across all between- and within-subject factors, contrast testing in all other ANOVA programs in AFNI (3dRegAna and GroupAna of the Matlab package) are consistent with the above principle. Bear in mind the coeficients of a contrast should always add up to 0 in GroupAna.
1. David C. Howell, Statistical Methods for Psychology, Wadsworth Publishing; 5th edition, 2001