Hi all,
I am having problems fitting a quadratic term to a model in Proc Mixed. The following is my code (which exactly mimics the code given in Littell's SAS for Mixed Models book at the top of p. 196):
proc mixed data=all_means_analysis noprofile;
title1 'Heterogeneous Autoregressive Mixed Model';
class treatment drought week pot;
model meanphoto = treatment drought week w w2 treatment*drought treatment*week treatment*w treatment*w2 treatment*drought*week treatment*drought*w treatment*drought*w2/htype=1;
repeated week / type=arh(1) sub=pot(treatment);
parms (1.2526) (1.2526) (1.4143) (1.3907) (1.9521) (1.4706) (1.3724) (1.2562) (1.2165) (0.7997) (0.6041) (0.7220) (0.3535) (1.1845) (0.5467) (1.1075) (1.7849) (1.2526) (1.1370) (0.02428) (0.6188) / noiter;
run;
I am trying to look at photosynthetic rate over time, but it decreases over the growing season, so I think I need the quadratic term (w2 = week*week; w = week). But this is the output I get - without any error messages from the SAS system:
Type 3 Tests of Fixed Effects
Num Den
Effect DF DF F Value Pr > F
treatment 2 117 2.36 0.0989
drought 1 117 0.31 0.5790
week 14 779 43.40 <.0001
w 0 . . .
w2 0 . . .
treatment*drought 2 117 5.18 0.0070
treatment*week 27 779 0.97 0.5074
w*treatment 0 . . .
w2*treatment 0 . . .
treatme*drought*week 36 779 10.11 <.0001
w*treatment*drought 0 . . .
w2*treatment*drought 0 . . .
Is the model simply out of degrees of freedom? I have 123 samples, and when I remove some of the interactions from the model to free up some df, the model still will not fit any quadratic terms.
Someone has suggested that the problem here is that w and w2 are completely confounded with the class variable week, and so there are no degrees of freedom to estimate these parameters. But when I remove week as a class variable from the model, I get the following message:
ERROR: Only class variables allowed in this effect.
Help?!
Thanks!!!