Programming the statistical procedures from SAS

Post-hoc test in repeated measures anova

Reply
Occasional Contributor
Posts: 10

Post-hoc test in repeated measures anova

Hi

 

I run the following repeated measure anova in sas (I have 2 treatment groups with 4 repeated measures):

 

PROC GLM DATA=analysisdata;
MODEL PRE FU1 FU2 FU3 = TREAT/ NOUNI;
REPEATED TIME 3 CONTRAST (1) / SUMMARY;
RUN;

 

The treatment*time interaction was significant. Now I would like to test within each treatment group, if there was a significant change over time and if the change between baseline (PRE) and followup1 (FU1) , the change between baseline (PRE) and followup2 (FU2) and the change between baseline (PRE) and followup3 (FU3) were signifiant. How to do these tests in SAS?

Concerning the multiple testing: What kind of adjustment do I have to do? Do I only have to adjust within each treatment group for the fact that I do 3 test (PRE versus FU1,PRE versus FU2 and PRE versus FU3) or does the adjustment have  to be done over the groups (i.e. it would be 6 tests PRE versus FU1,PRE versus FU2 and PRE versus FU3 per group).

Thanks for your help.

 

 

Respected Advisor
Posts: 2,655

Re: Post-hoc test in repeated measures anova

It has been a very long time since I used PROC GLM to do repeated measures analysis, so I am going to give an answer using what I would do, using PROC GLIMMIX.

 

First, reshape your data from wide to long:

 

data want;

set analysisdata;

value=pre;time=0;output;

value=fu1;time=1;output;

value=fu2;time=2;output;

value=fu3;time=3;output;

drop pre fu1 fu2 fu3;

run;

 

proc glimmix data=want;

class treat time subjectid;

model value=treat time treat*time/ddfm=kr2;

random time/residual type=ar(1) subject=subjectid;

lsmeans treat*time/slicediff=(time treat) slicedifftype=control/adjust=simulate(seed=1) adjdfe=row;

run;

 

This should give the simple effect differences for each time point from the initial time point within each treatment, and the comparisons between treatments at each time point, with adjustment for all comparisons made.  It assumes that there are multiple subjects within each treatment group, indexed by subjectid, and that the time points are equally spaced.

 

Steve Denham

Ask a Question
Discussion stats
  • 1 reply
  • 4817 views
  • 2 likes
  • 2 in conversation