```Date: Wed, 6 May 1998 16:58:10 GMT Reply-To: David Nichols Sender: "SAS(r) Discussion" From: David Nichols Organization: /usr/lib/news/organi[sz]ation Subject: Re: Analysis of Covariance with Repeated Measures In article <6gtj1l\$f9o\$1@flood.weeg.uiowa.edu>, wrote: >Someone recently asked me a question about the repeated measures >analysis of covariance example on pp. 805-808 of Winer, 1971, >Statistical Principles in Experimental Design. > >The example has three groups with three subjects/group. A response >(Y) and a covariate (X) are measured two times for each subject. >Neither one of us can determine how to produce Winer's analysis of >covariance (panel (iii) of Table 10.6-7). > >It seems evident that the "multivariate" data organization of proc glm >can't be used, since there's no way to account for the repeated >measurements of the covariate. The "univariate" data organization >gives some of Winer's sums of squares, but doesn't give Winer's >estimate for the group sum of squares (factor A). > >Although I'm not an SPSS user, the person who asked me the question is >able to reproduce Winer's results using SPSS. > >If anyone in this group has previously considered this type of >example, I'd appreciate your comments. > >Thanks, > >Chuck > >The SAS statements I've considered follow: > > data covar; > input subject group time x y; > cards; >1 1 1 3 8 >1 1 2 4 14 >2 1 1 5 11 >2 1 2 9 18 >3 1 1 11 16 >3 1 2 14 22 >4 2 1 2 6 >4 2 2 1 8 >5 2 1 8 12 >5 2 2 9 14 >6 2 1 10 9 >6 2 2 9 10 >7 3 1 7 10 >7 3 2 4 10 >8 3 1 8 14 >8 3 2 10 18 >9 3 1 9 15 >9 3 2 12 22 >; > proc glm; class subject group time; > model y=group subject(group) time group*time x; > test H=group E=subject(group); > I can tell you how SPSS is getting the results in Winer. The way SPSS MANOVA is doing this is to create two new sets of transformed variables and to do two different analyses, one for the between subjects results and one for the within subjects results. Using defaults, the transformed variables are: T1=(Y1+Y2)/SQRT(2) T2=(Y2-Y1)/SQRT(2) T3=(X1+X2)/SQRT(2) T4=(X2-X1)/SQRT(2) The square root of 2 is used to maintain the normalized metric for the transformed variables. The two analyses are then: T1 = CONSTANT + GROUP + T3 T2 = CONSTANT + GROUP + T4 The analysis for T1 (for the between subjects part of the model) is taken at face value. That for T2 (for the within subjects part of the model) is using a difference variable, so the group term is really group*time, and the constant term is time. I've never found a way to replicate this analysis other than doing it this way. BMDP offers it in some of their routines, but the new SPSS GLM procedure will not do it without doing multiple runs on transformed variables either, as it uses the same standard formulation of the general linear model used in SAS PROC GLM (a repeated measures analysis is the same as a multivariate analysis, with an M matrix applied after the fact to obtain tests of the repeated measures effects). -- David Nichols Principal Support Statistician and Manager of Statistical Support SPSS Inc. ```

Back to: Top of message | Previous page | Main SAS-L page