<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Problem with quadratic term in Proc Mixed in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Problem-with-quadratic-term-in-Proc-Mixed/m-p/21655#M685</link>
    <description>The error message:&lt;BR /&gt;
&lt;BR /&gt;
ERROR: Only class variables allowed in this effect&lt;BR /&gt;
&lt;BR /&gt;
is a result of the fact that the REPEATED statement requires a class variable. Removing week as a class variable from the model violates this. &lt;BR /&gt;
&lt;BR /&gt;
So, I am back to my initial question - thanks in advance for your help!</description>
    <pubDate>Thu, 03 Mar 2011 14:57:58 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2011-03-03T14:57:58Z</dc:date>
    <item>
      <title>Problem with quadratic term in Proc Mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Problem-with-quadratic-term-in-Proc-Mixed/m-p/21654#M684</link>
      <description>Hi all,&lt;BR /&gt;
&lt;BR /&gt;
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):&lt;BR /&gt;
&lt;BR /&gt;
proc mixed data=all_means_analysis noprofile;&lt;BR /&gt;
title1 'Heterogeneous Autoregressive Mixed Model';&lt;BR /&gt;
class treatment drought week pot;&lt;BR /&gt;
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;&lt;BR /&gt;
repeated week / type=arh(1) sub=pot(treatment);&lt;BR /&gt;
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;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
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:&lt;BR /&gt;
&lt;BR /&gt;
Type 3 Tests of Fixed Effects&lt;BR /&gt;
&lt;BR /&gt;
Num Den&lt;BR /&gt;
Effect DF DF F Value Pr &amp;gt; F&lt;BR /&gt;
&lt;BR /&gt;
treatment 2 117 2.36 0.0989&lt;BR /&gt;
drought 1 117 0.31 0.5790&lt;BR /&gt;
week 14 779 43.40 &amp;lt;.0001&lt;BR /&gt;
w 0 . . .&lt;BR /&gt;
w2 0 . . .&lt;BR /&gt;
treatment*drought 2 117 5.18 0.0070&lt;BR /&gt;
treatment*week 27 779 0.97 0.5074&lt;BR /&gt;
w*treatment 0 . . .&lt;BR /&gt;
w2*treatment 0 . . .&lt;BR /&gt;
treatme*drought*week 36 779 10.11 &amp;lt;.0001&lt;BR /&gt;
w*treatment*drought 0 . . .&lt;BR /&gt;
w2*treatment*drought 0 . . .&lt;BR /&gt;
&lt;BR /&gt;
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.&lt;BR /&gt;
&lt;BR /&gt;
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:&lt;BR /&gt;
&lt;BR /&gt;
ERROR: Only class variables allowed in this effect.&lt;BR /&gt;
&lt;BR /&gt;
Help?!&lt;BR /&gt;
&lt;BR /&gt;
Thanks!!!</description>
      <pubDate>Thu, 03 Mar 2011 14:50:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Problem-with-quadratic-term-in-Proc-Mixed/m-p/21654#M684</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2011-03-03T14:50:19Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with quadratic term in Proc Mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Problem-with-quadratic-term-in-Proc-Mixed/m-p/21655#M685</link>
      <description>The error message:&lt;BR /&gt;
&lt;BR /&gt;
ERROR: Only class variables allowed in this effect&lt;BR /&gt;
&lt;BR /&gt;
is a result of the fact that the REPEATED statement requires a class variable. Removing week as a class variable from the model violates this. &lt;BR /&gt;
&lt;BR /&gt;
So, I am back to my initial question - thanks in advance for your help!</description>
      <pubDate>Thu, 03 Mar 2011 14:57:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Problem-with-quadratic-term-in-Proc-Mixed/m-p/21655#M685</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2011-03-03T14:57:58Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with quadratic term in Proc Mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Problem-with-quadratic-term-in-Proc-Mixed/m-p/21656#M686</link>
      <description>Hi all,&lt;BR /&gt;
&lt;BR /&gt;
I think I may have found the solution: Keeping week as a class variable, using it in the REPEATED statement, but removing it from the model, seems to work.&lt;BR /&gt;
&lt;BR /&gt;
Now, I just need to decide if keeping the quadratic term in the model is appropriate...</description>
      <pubDate>Thu, 03 Mar 2011 15:36:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Problem-with-quadratic-term-in-Proc-Mixed/m-p/21656#M686</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2011-03-03T15:36:27Z</dc:date>
    </item>
  </channel>
</rss>

