BookmarkSubscribeRSS Feed
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);







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.




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
  • 1 reply
  • 2 in conversation