<?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 Adding a quadratic term of Time in proc mixed in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Adding-a-quadratic-term-of-Time-in-proc-mixed/m-p/932601#M46486</link>
    <description>&lt;P&gt;Dear all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am investigating subjective stress levels during a psychosocial stress test. I ran into problems with a more complex model, and started with simplifying my model to figure out the source of the issues. I am already running into trouble by adding a quadratic term of time.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code is as follows:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc mixed data=MAST_long_VAS;&lt;BR /&gt;class PPID Time;&lt;BR /&gt;model BC_stress = Time Time*Time / solution residual influence;&lt;BR /&gt;repeated Time / subject=PPID type=ar(1);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This model runs without any problems or warnings, but does not give me the output for the fixed effect of Time*Time (only the fixed effect of Time). I tried removing "Time" from the class statement, but then I get the warning that only class variables are allowed in the repeated statement. Can anyone help me with this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 17 Jun 2024 09:58:52 GMT</pubDate>
    <dc:creator>mvdnho2</dc:creator>
    <dc:date>2024-06-17T09:58:52Z</dc:date>
    <item>
      <title>Adding a quadratic term of Time in proc mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Adding-a-quadratic-term-of-Time-in-proc-mixed/m-p/932601#M46486</link>
      <description>&lt;P&gt;Dear all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am investigating subjective stress levels during a psychosocial stress test. I ran into problems with a more complex model, and started with simplifying my model to figure out the source of the issues. I am already running into trouble by adding a quadratic term of time.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code is as follows:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc mixed data=MAST_long_VAS;&lt;BR /&gt;class PPID Time;&lt;BR /&gt;model BC_stress = Time Time*Time / solution residual influence;&lt;BR /&gt;repeated Time / subject=PPID type=ar(1);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This model runs without any problems or warnings, but does not give me the output for the fixed effect of Time*Time (only the fixed effect of Time). I tried removing "Time" from the class statement, but then I get the warning that only class variables are allowed in the repeated statement. Can anyone help me with this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2024 09:58:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Adding-a-quadratic-term-of-Time-in-proc-mixed/m-p/932601#M46486</guid>
      <dc:creator>mvdnho2</dc:creator>
      <dc:date>2024-06-17T09:58:52Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a quadratic term of Time in proc mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Adding-a-quadratic-term-of-Time-in-proc-mixed/m-p/932604#M46487</link>
      <description>&lt;P&gt;Time*Time is only meaningful for numeric variables. It has no meaning (mathematically) for class variables, you can't square a class variable, you can only square a numeric (&lt;EM&gt;i.e.&lt;/EM&gt; non-class) variable.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2024 11:41:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Adding-a-quadratic-term-of-Time-in-proc-mixed/m-p/932604#M46487</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-06-17T11:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a quadratic term of Time in proc mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Adding-a-quadratic-term-of-Time-in-proc-mixed/m-p/932606#M46488</link>
      <description>Thank you, this is of course true. I found the solution in the meantime: create a duplicate variable of time, one which you can use in the class and repeated statement, while the other can be used in the model statement.</description>
      <pubDate>Mon, 17 Jun 2024 12:00:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Adding-a-quadratic-term-of-Time-in-proc-mixed/m-p/932606#M46488</guid>
      <dc:creator>mvdnho2</dc:creator>
      <dc:date>2024-06-17T12:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a quadratic term of Time in proc mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Adding-a-quadratic-term-of-Time-in-proc-mixed/m-p/932607#M46489</link>
      <description>&lt;P&gt;I am not sure this is a legitimate analysis or not, to have TIME in the MODEL statement as a numeric variable, and a different variable which is the same TIME but categorical, in the REPEATED statement. I am going to have to think about this.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2024 12:27:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Adding-a-quadratic-term-of-Time-in-proc-mixed/m-p/932607#M46489</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-06-17T12:27:59Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a quadratic term of Time in proc mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Adding-a-quadratic-term-of-Time-in-proc-mixed/m-p/932610#M46490</link>
      <description>&lt;P&gt;Yes, you can create a copy of the TIME variable to use as a place holder on the REPEATED statement. Call the copy of the TIME variable TIME_C or something that reminds you that you are using this effect only on the REPEATED statement to indicate the order of the time responses. TIME on the MODEL statement and/or RANDOM statement. TIME_C as the repeated effect before the slash on the REPEATED statement.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2024 12:47:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Adding-a-quadratic-term-of-Time-in-proc-mixed/m-p/932610#M46490</guid>
      <dc:creator>StatsMan</dc:creator>
      <dc:date>2024-06-17T12:47:11Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a quadratic term of Time in proc mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Adding-a-quadratic-term-of-Time-in-proc-mixed/m-p/932882#M46523</link>
      <description>&lt;P&gt;Have you considered using PROC GLIMMIX, as in the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc glimmix data=MAST_long_VAS;
class PPID Time;
model BC_stress = Time Time*Time / solution;
random _residual_ / subject=PPID type=ar(1);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;In large part, this is adapted from the example -&amp;nbsp;&lt;SPAN&gt;Example 22.10 Correlation and Covariance Matrices in Using the Output Delivery System documentation.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;SteveDenham&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2024 16:57:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Adding-a-quadratic-term-of-Time-in-proc-mixed/m-p/932882#M46523</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2024-06-18T16:57:24Z</dc:date>
    </item>
  </channel>
</rss>

