30.1 - Lesson Notes

A. Introduction

Page 237. The authors mention using the MIXED procedure in place of all of the analyses contained in the chapter to obtain better estimates of the standard errors of the estimates. I fully agree, but we can't possibly digress to learning about mixed models in the scope of this one-credit course. The important thing is that you know that the MIXED procedure exists so that when you encounter mixed models in your other statistics courses, you can ask if the instructor can discuss mixed model analyses in the context of the MIXED procedure in SAS. Here, we'll focus primarily on alternative ways of analyzing your repeated measures data.

B. One-Factor Experiments

Page 240. Although the authors use the ANOVA procedure here, and throughout the remainder of the chapter, they could have just as easily used the GLM procedure throughout the chapter. Don't forget, in fact, that you have to use the GLM procedure when your design is unbalanced.

C. Using the Repeated Statement of PROC ANOVA

Page 243. Here's another example in which you need to know the structure of the data that SAS expects in order to analyze the data. In the previous example in Section B, SAS expected a tall data set, in which each observation contains a subject's pain score on a particular drug. Here, SAS expects a fat data set, in which each observation contains a subject's pain scores on all four of the drugs.

Page 245. In case you want to see the (extensive) output from the SAS code:

OPTIONS PS = 58 LS = 72 NODATE NONUMBER;
DATA repeat1;
		input subj pain1-pain4;
		DATALINES;
		1  5  9  6 11
		2  7 12  8  9
		3 11 12 10 14
		4  3  8  5  8
		;
RUN;

PROC ANOVA data = repeat1;
	title 'One-way ANOVA using the REPEATED statement';
	model pain1-pain4 = / NOUNI;
	repeated DRUG 4 contrast(1) / NOM SUMMARY;
	repeated DRUG 4 contrast(2) / NOM SUMMARY;
	repeated DRUG 4 contrast(3) / NOM SUMMARY;
RUN

E. Two-Factor Experiments with a Repeated Measure on One Factor

Page 252. The code on this page transposes the fat data set on page 248, in which each observation contains the pre and post-times for a subject to a tall data set, in which each observation contains one of the times (pre or post) for a subject.