Programming the statistical procedures from SAS

PROC GLM repeated measures (one class, two models)

Reply
Occasional Contributor
Posts: 15

PROC GLM repeated measures (one class, two models)

HI there,

I want to conduct a repeated measures MANOVA to examine the effect of treatment (and gender as between subject factor) on Energy Intake (EI) and Water Intake (WI). I am putting these two dependent variables in the same analysis as there is a weak correlation between them.

There are three kinds of treatment and I am looking at the effect of those treatments on each group (EIkcal 1-3 and WI 1-3).

However, SAS interprets that there are six kinds of treatment (please refer to the attachment).

Please tell me how I can modify the code below! TIA

 

Variables: ID gender Eikcal1 EIkcal2 EIkcal3 WI1 WI2 WI3 ...

 

Code:
proc glm data=IMPORT2;
class gender;
model EIkcal1-EIkcal3 WI1-WI3 = gender / nouni;
repeated Treatment / printe;
run;

 

 

 

スクリーンショット 2018-02-03 02.50.59.png

 

PROC Star
PROC Star
Posts: 404

Re: PROC GLM repeated measures (one class, two models)

Posted in reply to madpumpkinpie

I suspect you are not thinking correctly about your experimental design. Are all three treatments assigned to each subject (which would be a repeated measures treatment structure), or is each subject assigned to a single treatment (which would not be a repeated measures treatment structure)?

 

Also I notice from your output snippet that 123 observations are read but only 41 are used in analysis, which is not good and suggests a lot of missing values. From the MIXED documentation:

 

"When a MANOVA statement appears before the first RUN statement, PROC GLM enters a multivariate mode with respect to the handling of missing values; in addition to observations with missing independent variables, observations with any missing dependent variables are excluded from the analysis."

Occasional Contributor
Posts: 15

Re: PROC GLM repeated measures (one class, two models)

Thanks for responding,

Yeah I noticed the same thing, I just forgot to delete extra data (gender column had 82 extra rows).

The number of participants is 41 and all three treatments were assigned to each of them.

 

PROC Star
PROC Star
Posts: 404

Re: PROC GLM repeated measures (one class, two models)

Posted in reply to madpumpkinpie

In what order were the three treatments assigned? Did you invoke some form of cross-over design? (Generally one should seriously consider Latin square or crossover designs when applying multiple treatments to the same subject.)

 

Setting aside issues of potential treatment carryover or order effect, I would consider using the MIXED procedure with a Kronecker product covariance structure for the repeated measures through time and multiple response variables, or joint modeling of multiple response variables in GLIMMIX.

 

Some toeholds into the concepts:

 

The Punchline: MANOVA or a Mixed Model?

 

The use of MIXED models in the analysis of animal experiments with repeated measures data

 

Advanced Techniques for Fitting Mixed Models Using SAS/STAT® Software

 

Example 38.5 Joint Modeling of Binary and Count Data

 

PROC Star
PROC Star
Posts: 404

Re: PROC GLM repeated measures (one class, two models)

If GLM is your preferred tool, then there is this from the GLM documentation for the REPEATED statement:

 

When specifying more than one factor, list the dependent variables in the MODEL statement so that the within-subject factors defined in the REPEATED statement are nested; that is, the first factor defined in the REPEATED statement should be the one with values that change least frequently. For example, assume that three treatments are administered at each of four times, for a total of twelve dependent variables on each experimental unit. If the variables are listed in the MODEL statement as Y1 through Y12, then the REPEATED statement in

 proc glm;
     classes group;
     model Y1-Y12=group / nouni;
     repeated trt 3, time 4;
 run;

implies the following structure:

 

Dependent Variables

 

Y1

Y2

Y3

Y4

Y5

Y6

Y7

Y8

Y9

Y10

Y11

Y12

Value of trt

1

1

1

1

2

2

2

2

3

3

3

3

Value of time

1

2

3

4

1

2

3

4

1

2

3

4

Occasional Contributor
Posts: 15

Re: PROC GLM repeated measures (one class, two models)

Thank you for responding!!

I just posted another question (https://communities.sas.com/t5/SAS-Statistical-Procedures/Two-within-subject-factors-repeated-measur...) but your code may work for it.

 

What does "group" means? Does it from the data?

 

PROC Star
PROC Star
Posts: 404

Re: PROC GLM repeated measures (one class, two models)

Posted in reply to madpumpkinpie

"group" would be analogous to your "gender"

 

There does seem to be a lot of overlap in your two threads. You can sort out this one and that might solve the second. I'll wait to see.

Occasional Contributor
Posts: 15

Re: PROC GLM repeated measures (one class, two models)

It's randomized cross-over design, so the order of treatment is different between each subject. As there was no effect of session order on food intake (kcal), I did not consider it in this analysis.

 

Thank you for many resources, I get a bit confused but will refer to them!

 

 

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