BookmarkSubscribeRSS Feed
palolix
Quartz | Level 8

Dear SAS Community,

 

I have a Latin Square Design with two factors (4 treatments and 5 depths). I am not sure if my code is correct, so I would greatly appreciate if I could get some feedback. Thank you!

 

proc glm;
class row col trt depth;
model lgRing=row col trt depth trt*depth;
lsmeans trt*depth / adjust=tukey lines;
contrast '1 v 2 when depth=1' trt 1 -1 0 0;
contrast '1 v 3 when depth=1' trt 1 0 -1 0;
contrast '1 v 4 when depth=1' trt 1 0 0 -1;
contrast '2 v 3 when depth=1' trt 0 1 -1 0;
contrast '2 v 4 when depth=1' trt 0 1 0 -1;
contrast '3 v 4 when depth=1' trt 0 0 1 -1;
run;

 

4 REPLIES 4
StatsMan
SAS Super FREQ

You may need to specialize some error terms here. This example in the GLM doc will get you started. PROC MIXED is a good alternative to GLM in these situations, too.

palolix
Quartz | Level 8

Thank you very much for your feedback StatsMan,

 

The example was very helpful. In my case I have a latin square split block design with depth as the strip factor.

I tried using proc mixed but I didn't get any F values. Any idea of what it is wrong?

proc mixed;
class row col trt depth;
model lgRing= row col trt col*trt row*col*trt depth row*depth col*depth trt*depth col*trt*depth row*col*trt*depth/ddfm=satterthwaite;
run;

 

Thanks a lot!

StatsMan
SAS Super FREQ

Posting your results and providing more detail about your data (replications, specifically) will help us diagnose the problem

palolix
Quartz | Level 8

Thank you StatsMan for your reply. I attached the SAS code I am using. I have four replications (blocks) per treatment. I have also attached a file of the map.

 

Thank you very much for your help!

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 4 replies
  • 826 views
  • 3 likes
  • 2 in conversation