BookmarkSubscribeRSS Feed
ChKayAb
Calcite | Level 5

I'm having trouble debugging my analysis.

Am I using the right procedure? 

I designed a Latin square observational experiment that was replicated for 3 years.

3 new colonies were assigned to each farm each year, and I had 3 farms in each of my 3 treatments.  

Colonies are my sub replicate (nested in farm). 

I then measured colony weight weekly. 

However, my data is not entirely complete. 

In year 1, I only have measurements for weeks 1, 5, 9, and 13.

In year 3, I only assigned 2 colonies to each farm.

 

I've managed to come up with the below model. However, my results don't show a test statistic for Treatment effect. 

Can you tell me if I'm using the right procedure and is my model is incorrect? 

 

proc mixed;
class Treatment Colony Farm Year Week Weight;
model Weight = Treatment Week Treatment*Week Treatment*Year Treatment*Week*Year Farm Year Week / ddfm=kr;
random int / subject=Colony(Farm);
random int / subject=Year;
repeated week / subject=Treatment(Colony Farm Year) type=ar(1);
run;

 

ChKayAb_0-1708885193947.png

 

 

 

 

1 REPLY 1
SteveDenham
Jade | Level 19

This is a "not sure if it will work" answer, but the degrees of freedom look a bit wonky, and it is probably because you are using the Kenward-Roger denominator degrees of freedom with a very sparse dataset due to the missing values.

Try, in order, ddfm=satterthwaite, ddfm=bw, or using ddf= with fixed values based on a skeleton ANOVA table. You could then add in an EMPIRICAL option to get the shrinkage estimates.

 

SteveDenham

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
  • 1 reply
  • 242 views
  • 0 likes
  • 2 in conversation