## Technote (FAQ)

## Question

I am using the MIXED procedure (Analyze->Mixed Models->Linear) in IBM SPSS Statistics. I have a time factor with 4 levels and would like to test polynomial contrasts involving that factor. I do not see a Contrast option in the Linear Mixed Models dialog or the MIXED command syntax chart. How would I request linear, quadratic, and cubic contrasts, for example, in MIXED?

## Answer

The MIXED procedure does not have a /CONTRAST subcommand but does have a /TEST subcommand where user-defined contrasts can be tested. Polynomial contrasts can be tested with /TEST subcommands, using orthogonal polynomial contrast coefficients as found in Bock (1975; 1985; Appendix B), Kirk (1995, Table E.10), )Maxwell and Delaney (2004, Table A.10), and other experimental design texts.

Based on the orthogonal polynomial contrast sources, the linear contrast coefficients for an effect with 4 levels (assuming equal distance between levels) are -3, -1, 1, 3. The quadratic contrast coefficients are 1 -1 -1 1, and the cubic contrast coefficients are -1 3 -3 1.

The following example displays a set of /TEST subcommands for linear, quadratic, and cubic contrasts on a 4-level time factor. The MIXED syntax is modified somewhat from syntax found at

http://www.ats.ucla.edu/stat/paperexamples/singer/default.htm

That site contains data sets and syntax files (including SPSS syntax) for the analysis examples in Singer (1998). The commands below are based on the analysis of the Willett data, where WAVE is a 4-level repeated factor.

compute wave = time .

mixed y by wave

/print=solution

/fixed = wave

/repeated = wave | subject(id) covtype(cs)

/test "Linear time" wave -3 -1 1 3

/test "Quadratic time" wave 1 -1 -1 1

/test "Cubic time" wave -1 3 -3 1.

Bock, R.D. (1975) Multivariate Statistical Methods in Behavioral Research. New York: McGraw-Hill.

Bock, R.D. (1985) Multivariate Statistical Methods in Behavioral Research (2nd Ed.) . Chicago: Scientific Software International.

Kirk, R.E. (1995). Experimental Design: Procedures for the Behavioral Sciences (3rd Ed.). Pacific Grove CA: Brooks/Cole.

Maxwell, S.E., & Delaney, H.D. (2004). Designing Experiments and Analyzing Data: A Model Comparison Perspective (2nd Ed.). Mahwah NJ: Lawrence Erlbaum Assoc.

Singer, J. D. (1998). Using SAS Proc Mixed to Fit Multilevel Models, Hierarchical Models, and Individual Growth Models. Journal of Educational and Behavioral Statistics, 24(4), 323-355.

The Singer paper can be downloaded from Dr. Singer's site:

http://isites.harvard.edu/icb/icb.do?keyword=singer&pageid=icb.page316200

### Document information

**More support for:**
SPSS Statistics

**Software version:**
Not Applicable

**Operating system(s):**
Platform Independent

**Reference #:**
1622252

**Modified date:**
2013-01-21