Programming the statistical procedures from SAS

Repeated measures design question.

Reply
New Contributor
Posts: 4

Repeated measures design question.

Hi there!

I got a question for you guys and would really appreciate any light you can give on this.

We randomly assigned 120 experimental units to five dietary treatments and then performed monthly measures of body growth on them. So far, so good. The experiment went from June 2012 to March 2013. Now, we are interested in knowing if the weather interacted with the treatments somehow. Since the same animals spent time in both hot and cold weather, I think I can NOT just compare HOT vs. COLD given that observations are not independent.

How can I handle this "double affiliation" of animals to the 2 different weather categories in order to test the effect of an interaction between treatment and weather on growth? Can I even test this?

Since I already have an error correlation structure for the repeated growth measures, how can accommodate the dependence between observations from the same animal between HOT and COLD weather?

Thanks in advance for any help you guys can provide!!

Juan

Respected Advisor
Posts: 2,655

Re: Repeated measures design question.

One thing you might consider is adding TEMPERATURE as a class variable (with two values: HOT and COLD), and then using group=TEMPERATURE in the repeated statement.  This would allow for separate variance/covariance estimates for hot and cold weather.  To get at the comparison of HOT vs. COLD, then use the LSMESTIMATE statement to construct the hypothesis tests of interest.

Steve Denham

New Contributor
Posts: 4

Re: Repeated measures design question.

Thanks Steve!

I think I follow what you say. The separate variances will allow to test for differences in the TEMPERATURE groups, but I still wonder if this would allow to test somehow for an interaction with treatments.

Could you give any clues on that?

Thanks in advance!

Juan

Respected Advisor
Posts: 2,655

Re: Repeated measures design question.

Use the LSMESTIMATE statement to collect the various month LSmeans, and average as needed, and test away.

Do NOT include TEMPERATURE in the model.  It is an indicator variable that you will use in your REPEATED statement.

I suppose your model looks something like:

proc mixed data=yourdataset;

class treatment month subject;

model bodywt=treatment|month;

repeated month/subject=subject type=ar(1);

random intercept/subject=subject;

lsmeans treatment|month/diff;

run;

I am suggesting:

proc mixed data=yourdataset;

class treatment month subject TEMPERATURE;

model bodywt=treatment|month;

repeated month/subject=subject type=ar(1) group=TEMPERATURE;

random intercept/subject=subject;

lsmeans treatment|month/diff;

lsmestimate treatment*month "Treatment 1, HOT' 1 1 1 1 1 1 <a whole bunch of zeroes> /divisor=6;

run;

This supposes that the first six months are hot months.  You may want to add e and L options to make sure you are combining the right treatment/month combinations.  From there, tests of differences are just a matter of combining with the right sign attached.

Steve Denham

Ask a Question
Discussion stats
  • 3 replies
  • 140 views
  • 1 like
  • 2 in conversation