BookmarkSubscribeRSS Feed
Pauline_Agrosup
Calcite | Level 5

Hi,


Please could someone help me defining the most appropriate SAS code (SAS 9.3) for my statistical model.

 

Two groups of 3 animals were involved in a Latin square design comprising two periods of 7 weeks.. During the first period group 1 received treatment 1 and group 2 received treatment 2, and inversely in period 2. During each period, we measured the same parameters on all animals at different days (6 days of measurement within the 7 weeks), to follow the evolution of the parameters within each treatment.

 

I suggest this SAS model:

 

Class  animal period treatment day;

Model   parameter = period treatment day day*treatment day*period day*treatment*period;

Repeated  day /sub=animal*period type=cs ;

Run;

 

And one of my colleagues suggest another model:

 

Class  animal period treatment day;

Model   parameter = period treatment day day*treatment day*period day*treatment*period;

Repeated  day /sub=animal*period;

Random  animal animal*period / type = cs;

Run;

 

I am not sure if these two models are correct, and which one is the most appropriate.

In the model, should I test the period effect and the interactions with the period?

I am also asking about the random statement in the model: is it useful or not? Why?

The type of covariance structure must appear in the repeated or random statement?

 

I would greatly appreciate any help that you could offer.

 

Many thanks,

 

Pauline

 

 

2 REPLIES 2
SteveDenham
Jade | Level 19

I prefer the second model, if you add type=ar(1) to the repeated statement, to model the correlation over time, within period, and remove type=cs from the random statement.  You could leave this type= option in, but this is really a split-plot in time with the treatments arranged in a Latin square design for the main plot, so you are really only concerned with the variance component associated with these effects (animal and animal*period).

 

Steve Denham

 

 

 

 

Pauline_Agrosup
Calcite | Level 5

Thank you very much Steeve for your statistical model proposal! I think that it could be adapted to my data and I will test it.

 

Kind regards,

 

Pauline

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 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
  • 2 replies
  • 2057 views
  • 0 likes
  • 2 in conversation