BookmarkSubscribeRSS Feed
palolix
Obsidian | Level 7

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
Obsidian | Level 7

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
Obsidian | Level 7

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

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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