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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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