Programming the statistical procedures from SAS

Repeated Measures MANOVA

Reply
New Contributor
Posts: 4

Repeated Measures MANOVA

Could someone please confirm that the code below is for a repeated measures MANOVA? I was given this code and do not understand SAS programming well enough to decipher it all. I've been looking up how to code repeated measures MANOVA in SAS and have been finding different things, resulting in my confusion.

Just to give you a little background, diameter, height, and slope are the IVs. Trial is supposed to be the repeated measure. The DVs are Shld_P1_Abd, Shld_P1_Flex, and Wrist_P1.

data;

   input Subject          Diameter          Height          Slope          Trial

          Shld_P1_Abd          Shld_P1_Flex          Wrist_P1;

cards;

01          18          1          1          1          33.38568882          16.70412005          38.05523282

01          18          1          1          2          34.18666478          17.55598648          35.20134662

01          18          1          1          3          34.39176821          17.44692806          35.73618519

.

.

.

.

;

proc glm;

   class Subject Diameter Height Slope Trial;

    model Shld_P1_Abd          Shld_P1_Flex          Wrist_P1 =

               Diameter|Height|Slope subject trial subject*trial

               diameter*subject diameter*trial diameter*subject*trial

               Height*subject Height*trial Height*subject*trial

               Slope*subject Slope*trial Slope*subject*trial/ nouni;

    random subject trial subject*trial

               diameter*subject diameter*trial diameter*subject*trial

               Height*subject Height*trial Height*subject*trial

               Slope*subject Slope*trial Slope*subject*trial/ test;

               LSMEANS Diameter|Height|Slope / ADJUST=TUKEY PDIFF ;

                       run;

Hopefully this is enough information for someone to understand this. Any help would be greatly appreciated. Thanks.

Respected Advisor
Posts: 2,655

Re: Repeated Measures MANOVA

This sure looks like a repeated measures analysis, with random effects thrown in.  In this code, trial is NOT a repeated factor, but rather a random effect.  The repeated nature is found in the three response variables measured on each subject. 

The documentation for PROC MIXED offers a different approach, that considers both the measure and trial as repeated factors.  Look for the Kronecker product structures for multivariate repeated measures.  I think that this would provide a better analysis in the long run, if in fact trial is repeated.

The code would look something like:

proc mixed data=long;

   class Subject Diameter Height Slope Trial Var;

/* The variable Var identifies the three response variables*/

    model response=

               Diameter|Height|Slope|Trial|Var ;

repeated Var Trial/ type=un@ar(1) subject=subject;

/* This assumes that the time between trials is equally spaced.  If not, then type=un@un would probably be a first choice*/

               LSMEANS Diameter|Height|Slope|Var / ADJUST=TUKEY DIFF ;

                       run;

This requires re-arranging the input dataset. Suppose you have the input set now, call it work.wide.

data long;

length var $12.;

set wide;

response=Shld_P1_Abd, var='Shld_P1_Abd';output;

response=Shld_P1_Flex; var='Shld_P1_Flex';output;

response=Wrist_P1;var='Wrist_P1';output;

drop Shld_P1_Abd Shld_P1_Flex Wrist_P1;

run;

This sets up the dataset for the doubly repeated measures.

New Contributor
Posts: 4

Repeated Measures MANOVA

Thank you for your response. I will look into the PROC MIXED to see if that might be a better option for this situation.

Ask a Question
Discussion stats
  • 2 replies
  • 1237 views
  • 0 likes
  • 2 in conversation