<?xml version="1.0" encoding="utf-8"?><!DOCTYPE article  PUBLIC '-//OASIS//DTD DocBook XML V4.4//EN'  'http://www.docbook.org/xml/4.4/docbookx.dtd'><article><articleinfo><title>FAQ/rpcon</title><revhistory><revision><revnumber>11</revnumber><date>2013-03-08 10:17:13</date><authorinitials>localhost</authorinitials><revremark>converted to 1.6 markup</revremark></revision><revision><revnumber>10</revnumber><date>2009-08-14 09:19:25</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>9</revnumber><date>2009-08-14 09:18:23</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>8</revnumber><date>2009-08-14 09:14:32</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>7</revnumber><date>2009-08-14 09:13:12</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>6</revnumber><date>2009-08-13 15:33:46</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>5</revnumber><date>2009-08-13 15:32:50</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>4</revnumber><date>2009-08-13 15:32:13</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>3</revnumber><date>2009-08-13 15:27:49</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>2</revnumber><date>2009-08-13 15:18:41</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>1</revnumber><date>2009-08-13 15:15:50</date><authorinitials>PeterWatson</authorinitials></revision></revhistory></articleinfo><section><title>How do I perform a non-standard comparison of means in a repeated measures anova in SPSS ?</title><para>Suppose we have five measurements at different time points measured on a sample of people. We wish to compare the average of the first three time point measurements with the average of the last two. This is <emphasis>not</emphasis> one of the default contrasts in SPSS so we need literally something special to compute them. </para><para>This can be done in SPSS using the below syntax which uses the special option in the MANOVA procedure or by using <ulink url="https://lsr-wiki-02.mrc-cbu.cam.ac.uk/statswiki/FAQ/rpcon/statswiki/FAQ/glmrm#">GLM syntax.</ulink> The MANOVA syntax is a bit cumbersome in that you need to specify a 5 x 5 matrix of contrasts (in general a k x k for k repeated measures). The contrasts need to be <emphasis>orthogonal</emphasis> so the sum of their products should equal zero. One tip is to use a row of '1s' for the first contrast. The actual contrast of interest here is the second specified contrast = (-0.333,-0.333,-0.333,0.5,0.5). </para><screen><![CDATA[MANOVA A B C D E
 /WSFACTORS = TIME(5)
 /CONTRAST (TIME)= SPECIAL(1 1 1 1 1 -0.333 -0.3333 -0.333  0.5 0.5 1 -1 0 0 0 1 0-1 0 0 0 0 0 1 -1)
/PRINT = TRANSFORM PARAMETERS(ESTIM) 
/WSDESIGN. ]]></screen><para>The output will include something like this for each of the k contrasts whjich SPSS calls T1 to Tk. Since the contrast of interest is the second contrast we look in the output for T2. </para><para>Contrast T2 tests whether the difference between the first three means and the last two means equals zero. </para><itemizedlist><listitem override="none"><para>Estimates for T2 --- Individual univariate .9500 confidence intervals TIME </para></listitem></itemizedlist><informaltable><tgroup cols="14"><colspec colname="col_0"/><colspec colname="col_1"/><colspec colname="col_2"/><colspec colname="col_3"/><colspec colname="col_4"/><colspec colname="col_5"/><colspec colname="col_6"/><colspec colname="col_7"/><colspec colname="col_8"/><colspec colname="col_9"/><colspec colname="col_10"/><colspec colname="col_11"/><colspec colname="col_12"/><colspec colname="col_13"/><tbody><row rowsep="1"><entry colsep="1" nameend="col_7" namest="col_0" rowsep="1"><para> Parameter </para></entry><entry colsep="1" rowsep="1"><para>Coeff. </para></entry><entry colsep="1" rowsep="1"><para>Std. Err. </para></entry><entry colsep="1" rowsep="1"><para> t-value </para></entry><entry colsep="1" rowsep="1"><para> Sig. t </para></entry><entry colsep="1" rowsep="1"><para> Lower -95% </para></entry><entry colsep="1" rowsep="1"><para> % CL- Upper </para></entry></row><row rowsep="1"><entry colsep="1" nameend="col_7" namest="col_0" rowsep="1"><para> 1 </para></entry><entry colsep="1" rowsep="1"><para> -0.45323949 </para></entry><entry colsep="1" rowsep="1"><para> .43002 </para></entry><entry colsep="1" rowsep="1"><para> -1.05400 </para></entry><entry colsep="1" rowsep="1"><para> .31448 </para></entry><entry colsep="1" rowsep="1"><para> -1.39970 </para></entry><entry colsep="1" rowsep="1"><para> .49322 </para></entry></row></tbody></tgroup></informaltable><para>Note that SPSS orthonormalises the contrast coefficients which simply signifies the squares of the contrast coefficients sum to unity. The contrast coefficients can be outputted using the /PRINT=TRANSFORM subcommand and are in our case (-0.365,-0.365,-0.365,0.548,0.548). Notice the first three contrast vector elements and last two elements are equal confirming we wish to compare the first three and last two means. </para><para>Multiplying each of the elements in this contrast vector by the five time means gives -0.365(4.1666 + 4.25 + 4.583) + 0.548(4.333+3.5) = 0.45 = the outputted contrast coefficient above. </para></section></article>