LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (April 2000, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 7 Apr 2000 23:35:26 GMT
Reply-To:     Dale McLerran <dmclerra@FHCRC.ORG>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Dale McLerran <dmclerra@FHCRC.ORG>
Organization: Fred Hutchinson Cancer Research Center
Subject:      Re: GLM: Simple effects for within subjs factors

[posted and mailed] (Jay Weedon) wrote in <>:

>Hi folks, > >Is there any easy way to get SAS to do post-hoc tests on >within-subjects effects, using PROC GLM or otherwise? All the post-hoc >options in GLM seem to focus only on between-subjects effects. > >Example: A mixed model ANOVA has 2 groups (A1, A2) and 3 repeats >(B1,B2,B3) per subject. I want to do LSD pairwise comparisons among >B1,B2,B3 pooled across groups, and simple effects of B at A1, B at A2. > >TIA, >Jay Weedon. >


How about using PROC MIXED as follows:

proc mixed; class A B SUBJECT; model resp = A|B / s; repeated B / subject=SUBJECT type=UN; lsmeans B / diff; lsmeans A*B / slice=A diff;

I specified an unstructured covariance matrix for the repeated measures. You may choose a different covariance structure, but unstructured should be the same as doing a repeated measures analysis using GLM.

The structure of the data must be different for a repeated measures analysis using PROC MIXED than it is for PROC GLM. You need one record per time period by subject. That is, you would have 3*Ns observations, where Ns is the number of subjects in your dataset. The first record for subject 1 has response at period B1 and variable B=1, the second record for subject 1 has response at period B2 and variable B=2, etc.

In this framework, there is no difference in how we analyze A and B, except that we have specified that B is the variable which identifies the order of repetitions. I believe that this is easier to work with than in the GLM framework.


-------------------------------------- Dale McLerran Fred Hutchinson Cancer Research Center Seattle, WA 98109 ph: (206) 667-2926 fax: (206) 667-5977 --------------------------------------

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