FAQ/Contrasts - CBU statistics Wiki

Upload page content

You can upload content for the page named below. If you change the page name, you can also upload content for another page. If the page name is empty, we derive the page name from the file name.

File to load page content from
Page name
Comment
Type the missing letters from: Lodon is th capial of nglnd

location: FAQ / Contrasts

Components of Interaction

With some help from SPSS support, lots of experimentation, and the post archived at http://www.listserv.uga.edu/cgi-bin/wa?A2=ind0107&L=spssx-l&F=&S=&P=13210 I have come up with the following generalised summary of how /LMATRIX and /MMATRIX can be used to decompose a three-way interaction between two repeated measures factors, X_within and Y_within, and one between-subjects factor, group, assuming that each factor has three levels. My syntax might look something like this:

GLM XaYa XaYb XaYc XbYa XbYb XbYc XcYa XcYb XcYc BY group

/WSFACTOR = X_within 3 Polynomial Y_within 3 Polynomial

/METHOD = SSTYPE(3)

/CRITERIA = ALPHA(.05)

/WSDESIGN = X_within Y_within X_within*Y_within

/DESIGN = group .

If I have a significant three-way interaction and want to decompose it, I may be interested in any of the nine simple interaction effects that involve all three levels of the interacting factors, i.e.:

(1-3) X_within*group at Ya, Yb, Yc;

(4-6) Y_within*group at Xa, Xb, Xc;

(7-9) X_within*Y_within at G1, G2, G3.

The following steps provide some insight into how /LMATRIX and /MATRIX are used on their own before coming to how they are used together to find the nine simple interaction effects mentioned above

(i.) I can use an /LMATRIX subcommand on its own to define a contrast between my between-Ss factor(s), e.g.: /LMATRIX 'difference between group1 and group2' group 1 -1 0 In the output from this I get the equivalent of a LSD post-hoc test on the significance of the difference between group1 and group2, averaged across all X and Y. I can run as many of these contrasts as I care to in separate /LMATRIX subcommands.

(ii.) Alternatively I can put more than one contrast into a single /LMATRIX subcommand, separating them by semicolons, e.g.: /LMATRIX 'pooled group difference' group 1 -1 0; group 1 0 -1 In the output from this I get one test per contrast I define, plus an F-test on the "averaged variable", equivalent to a test on the main effect of group.

(iii.) By extension, I can use an /MMATRIX subcommand on its own to define a contrast between two of my within-Ss variables, e.g.: /MMATRIX 'difference between Xa and Xb at Y=a' XaYa 1 XbYa -1 XcYa 0 The /MMATRIX could also be written using ALL, so: /MMATRIX 'Difference between Xa and Xb at Y=a' all 1 0 0 -1 0 0 0 0 0 In the output from this I the equivalent of an unadjusted pairwise comparison (averaging across all groups) between Xa and Xb at Y=a, which could also have been produced through an /EMMEANS subcommand. I can only run one /MMATRIX subcommand at once.

(iv.) However, I can put more than one contrast into a single /MMATRIX subcommand, separating them by semicolons, e.g.: /MMATRIX 'Pooled X_within difference at Y=a' XaYa 1 XbYa -1 XcYa 0; XaYa 1 XbYa 0 XcYa -1 In the output from this I get one test per contrast I define, plus a multivariate test that is the equivalent of the simple main effect of X_within at Y=a (which I could also produce through an /EMMEANS subcommand).

(v.) I can combine /LMATRIX and /MMATRIX subcommands in the same routine to test for the simple interaction effects between factors, e.g.: /LMATRIX 'interaction X_within*group at Y=a' group 1 -1 0; group 1 0 -1 /MMATRIX 'Pooled X_within difference at Y=a' XaYa 1 XbYa -1 XcYa 0; XaYa 1 XbYa 0 XcYa -1 Notice that the /LMATRIX description has changed, because inclusion of the /MMATRIX modifies the reported results. In the output from this I get several different results: First is the K-matrix of contrast results, which in this instance contains four results. L1 column 1 is a test on the difference between (XaYa minus XbYa) for group 1 and (XaYa minus XbYa) for group 2; L1 column 2 is a test on (XaYa minus XcYa) for group 1 and (XaYa minus XcYa) for group 2. L2 is the same as L1 except the comparison is between groups 1 and 3. In other words these are tests on the relative size of selected pairwise comparisons. Second is a multivariate test result, which is a test on the interaction X_within*group at Y=a. The above syntax can therefore be generalized to find any of the simple interaction effects involving one-within and one between-Ss factor at fixed levels of the other within-Ss factor, i.e., 1-6 from the beginning. Finally are two univariate test results, which (I think) are a test of the simple interaction effect of between group and Xa/Xb at Ya, and between group and Xa/Xc at Ya, respectively. (vi) The last combination of /MMATRIX and /LMATRIX needed to solve for simple interaction effects 7-9 (involving two within-Ss factors at fixed levels of the between-Ss factor) causing problems. To fix the level of the between-subjects group, use three LMATRIX subcommands: /LMATRIX 'interaction X_within*Y_within at G=1' Intercept 1 group 1 0 0 /LMATRIX 'interaction X_within*Y_within at G=2' Intercept 1 group 0 1 0 /LMATRIX 'interaction X_within*Y_within at G=3' Intercept 1 group 0 0 1 Note that these are *not* pooled. To get the interaction of the two within factors X and Y use: /MMATRIX 'pooled X_within and Y_within differences' all 1 -1 0 -1 1 0 0 0 0; all 1 0 -1 0 0 0 -1 0 1 Here these are pooled over the two linearly independent possibilities: the interaction of 1 and 2, and of 1 and 3. The third, the interaction of levels 2 and 3, is omitted because it is redundant. This produces three multivariate results, one for each level of G for the simple interaction effect of X_within*Y_within. There are also three pairs of univariate results: I think the first is a test of the simple interaction effect of Xa/Xb * Ya/Yb at the relevant level of group; the second is a test of the simple interaction effect of Xa/Xc *Ya/Yc at the relevant level of group.

Nicholas Gibson -- Psychology and Religion Research Programme Faculty of Divinity, University of Cambridge West Road, Cambridge, CB3 9BS, UK tel +44 (0)1223 763010 ยท fax +44 (0)1223 763003 http://www.divinity.cam.ac.uk/pcp/personnel/nicholas.html

Return to Statistics FAQ page

Return to Statistics main page

Return to CBU main page

These pages are maintained by Ian Nimmo-Smith and Peter Watson