BookmarkSubscribeRSS Feed
JeffNCSU
Calcite | Level 5

About data:

(1) Prepared 4 different diets for pig industry:

dietIngredient AIngredient B
A_low_B_lowLowLow
A_high_B_lowHighLow
A_low_B_highLowHigh
A_high_B_highHighHigh

(2) Twelve (12) group pigs were randomly assigned to one of the diets, so 3 group pigs per diet treat.

(3) Twelve group pigs' weight (total) was monitored for 30 days (daily total weight).

The following questions might be asked:

  • (1)  Does the ingredient A affect pig performance?
  • (2) Does the ingredient B affect pig performance?
  • (3) Does age affect pig performance?
  • (4)  Is there evidence of interactions among ingredient A, B and Age?

I have tried to build the flowing model, but I am not so sure it is correct, please help:

Title "proc mixture";

proc mixed data=pigs;

   Class group ingredA ingredB Age ;

   Model Weight =ingredA|ingredB;

   random group;

   repeated Age/type=cs subject=group;

run;

1 REPLY 1
SteveDenham
Jade | Level 19

This is close, but does not address possible interactions between age and the ingredients.  How about:

proc mixed data=pigs;

   Class group ingredA ingredB Age ;

   Model Weight =ingredA|ingredB|Age;

   random group;

   repeated Age/type=cs subject=group;

run;

There are several other covariance structures you may want to investigate.  In particular, heterogeneous compound symmetry (type=csh), and, if the age variable is equally spaced in time, autoregressive structures such as ar(1) and arh(1).

In addition, if the interaction of Age with the dietary factors is significant (either two-way or three-way), when it comes time to compare marginal means using the lsmeans statement, you will want to look at the AT= option.

I would strongly recommend looking at Littel et al.'s SAS for Mixed Models, 2nd ed., which is a storehouse of information on repeated measures analysis of covariance.

Steve Denham

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 966 views
  • 3 likes
  • 2 in conversation