BookmarkSubscribeRSS Feed
juan
Calcite | Level 5

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

3 REPLIES 3
SteveDenham
Jade | Level 19

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

juan
Calcite | Level 5

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

SteveDenham
Jade | Level 19

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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 1276 views
  • 1 like
  • 2 in conversation