Programming the statistical procedures from SAS

SAS code for Latin square design including repeated measures

Reply
New Contributor
Posts: 2

SAS code for Latin square design including repeated measures

[ Edited ]

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

 

 

Respected Advisor
Posts: 2,655

Re: SAS code for Latin square design including repeated measures

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

 

 

 

 

New Contributor
Posts: 2

Re: SAS code for Latin square design including repeated measures

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

Ask a Question
Discussion stats
  • 2 replies
  • 230 views
  • 0 likes
  • 2 in conversation