Violations of sphericity?

FAQ: When do we have to worry about a violation of sphericity?

Whenever you run a repeated measures design with more than 2 repeated measures (e.g. measuring a group of participants on the criterion three times each, at Time 1, Time 2, and Time 3), you need to worry about sphericity on all of your within-subjects effects.

So why don’t we need to worry about sphericity if we only have 2 repeated measures (e.g. measuring a group of participants on the criterion at just Time 1 and Time 2)? Remember what this assumption actually refers to: the population variances of the sets of difference scores should be equal. So for three time points, you’ll have three sets of difference scores: T1-T2, T1-T3, and T2-T3. When you only have two time points, there’s only one set of difference scores: T1-T2. It’s impossible to have a violation. The test we run to check this assumption is Mauchly’s W, which is actually technically a test of compound symmetry rather than sphericity (it works out well, though, since whenever we have compound symmetry, we can trust that sphericity is also okay). Mauchly’s compares the covariance matrix for the repeated measures to a smoothed out version of it, where all of the covariances are replaced by the average covariance, and all of the variances (down the diagonal) are replaced by the average variance. So basically, Mauchly’s tests whether all of the variances are equal, and whether all of the covariances are equal. Again, if there are only two repeated measures, it’s impossible to have a violation since there is only one covariance.

Note that this logic applies to contrasts as well as to F tests on main effects. When you run contrasts on the levels of your repeated measure, you’re only comparing two groups at a time (it’s possible that one or both of those groups is made up of observations pooled from other groups, but when you’re testing them it’s been simplified to just two groups). Since there are only two groups, it’s impossible to have a violation of sphericity or compound symmetry, so SPSS doesn’t provide corrections for tests with 1 df (i.e. tests with only two groups), such as contrasts.

Regression module vs. GLM module in SPSS

  ANALYZE  REGRESSION ANALYZE → GENERAL LINEAR MODEL → UNIVARIATE ANOVA
Can you run an ANCOVA? Yes Yes
Can you test the homogeneity of regression coefficients assumption? Yes (use hierarchical regression) Not easily
Can you enter a categorical variable without dummy coding it first? NOOOO!!!! Every time you put a categorical variable that hasn’t been dummy coded into Regression, a kitten dies. Yes. SPSS dummy codes it for you behind the scenes.
Can you get an overall test for the effect of group when there are more than 2 levels? (Rather than just contrasts comparing particular groups) Yes, but it’s a pain (you have to use hierarchical regression, entering all of the dummy codes for your categorical predictor as a step in the model) Yes, it automatically gives you that F-test in the Between-Subjects Effects table.
Can you get estimates of effect size (partial eta-squared)? Not easily Yes, it’s under Options
Can you get collinearity diagnostics (e.g. tolerance)? Yes, it’s under Statistics Not easily
Can you get a plot of the residuals? Yes, under Plots, put ZPRED on the X-axis and ZRESID on the Y-axis Yes, if you save the standardized predicted values and standardized residual values as new variables, and then use the scatterplot function under graphs.
Can you see the adjusted means for each group? No (you can calculate them by hand, though) Yes
Can you get handy plots of the adjusted means? Not easily Yes, specify the plots you want under Plots
Can you test for differences between the adjusted means? Yes, any contrasts you have built into your design are testing differences between adjusted means. Yes, specify the comparisons you want under Contrasts
When I report contrasts, where is the t-statistic? Use the t-test for that comparison from the coefficients table From the contrasts table, the t = contrast estimate / SE
What is the df for the t-test of a contrast? Use the residual df from the Model Summary Use the error df from the Tests of Between-Subjects Effects

When we do ANCOVA examples in lab, we often start by running a hierarchical regression in the Regression module, and then we switch to the GLM module. Why? The results SPSS comes up with are the same either way since the underlying math is identical, but you can get different pieces of output from the two different modules, and some tasks are easier in one module vs. the other. For example, it’s easiest to test the assumption of homogeneity of regression coefficients under Regression, but it’s easiest to get plots of the adjusted means from GLM. It’s not necessary to run it in both, but you may want to because then you can get the best of both worlds output-wise.

What’s the difference between all the different kinds of orthogonal contrasts (Helmert, polynomial trend, etc.)?

There is no difference, really! For J group means, you can create J-1 orthogonal contrasts, but the particular contrasts that would be theoretically motivated will differ study to study. For some reason (vanity?) people started naming a couple common sets of orthogonal contrasts. There’s nothing fundamentally different about conducting Helmert contrasts vs. polynomial trend contrasts vs. some other set of orthogonal contrasts you invent. They’re all just contrast weights applied to group means. When you have a set of means you want to conduct contrasts on, just think about which comparisons would make sense theoretically and figure out a way you can elegantly get that information. When possible, you should construct orthogonal contrasts (but don’t stop yourself from testing an important question if it would mean non-orthogonal contrasts – orthogonality is good, but not vital). Maybe you’ll end up with a set of contrasts that has been named by somebody, maybe you won’t. It completely doesn’t matter. Just pay attention to your contrast weights and you’ll be able to interpret your results just fine.

For an excellent description of lots of different coding schemes – and all of the relevant code for using them in R! – see the contrast coding explanation from IDRE. Although beware: the contrasts() command is not as straightforward as the lovely folks at IDRE make it out to be. If you’re interested in trying this in R, be sure to also read my rpubs page on contrasts.

Also see this post by Nicole.