<?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: proc mixed, 'type=ar(1)' or 'type=SP(POW)(time)'? in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-type-ar-1-or-type-SP-POW-time/m-p/917412#M45532</link>
    <description>&lt;P&gt;yes, it seems that either model works for your data.&lt;/P&gt;</description>
    <pubDate>Thu, 22 Feb 2024 17:40:11 GMT</pubDate>
    <dc:creator>jiltao</dc:creator>
    <dc:date>2024-02-22T17:40:11Z</dc:date>
    <item>
      <title>proc mixed, 'type=ar(1)' or 'type=SP(POW)(time)'?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-type-ar-1-or-type-SP-POW-time/m-p/917352#M45520</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a few question about using linear mixed model for repeated measurements.&lt;/P&gt;&lt;P&gt;Each subject has different follow-up times and number of measurements. For example:&lt;/P&gt;&lt;P&gt;subject A: day 1, day 8, day 20&lt;/P&gt;&lt;P&gt;subject B: day 7, day 13&lt;/P&gt;&lt;P&gt;subject C: day 3, day 19, day 27&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;I then categorized time into 6-day intervals (0-6, 6-12, 12-18...) and labeled it as "time_category", and used it in the mixed model.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Given that the correlations are expected to be highest between adjacent times and lower between more distant times, could I say that the samples are equally spaced (0-6, 6-12..) and use 'type=ar(1)' ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or should I consider their orinial unequally spaced time before the categorization, and use 'type=SP(POW)(time)'?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. If type=ar(1) is better, should I add "time_category" after the REPEATED?&lt;/P&gt;&lt;P&gt;2. If type=SP(POW)(time) is better, does 'type=sp(pow)' only go with continuous variables? If it does, since I've categorized time into categories, should I turn it into something continuous like 1, 2, 3, 4,...?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. How could I draw a figure to see the differences in trajectory overtime between different site? (predicted value versus time)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code:&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC MIXED DATA = test&amp;nbsp; &amp;nbsp; &amp;nbsp;METHOD = REML COVTEST ;&lt;BR /&gt;CLASS&amp;nbsp; &amp;nbsp;site&amp;nbsp; &amp;nbsp; record_id&amp;nbsp; &amp;nbsp; time_category(ref="0-6");&lt;BR /&gt;MODEL Score =time_category&amp;nbsp; &amp;nbsp;site&amp;nbsp; &amp;nbsp;time_category*site/ SOLUTION;&lt;BR /&gt;RANDOM INTERCEPT / SUBJECT = record_id;&lt;BR /&gt;repeated time_category/ type=ar(1)&amp;nbsp; &amp;nbsp;SUBJECT = record_id;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Any suggesstions are appreciated, thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 13:34:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-type-ar-1-or-type-SP-POW-time/m-p/917352#M45520</guid>
      <dc:creator>GiaLee</dc:creator>
      <dc:date>2024-02-22T13:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: proc mixed, 'type=ar(1)' or 'type=SP(POW)(time)'?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-type-ar-1-or-type-SP-POW-time/m-p/917369#M45521</link>
      <description>&lt;P&gt;TYPE=AR(1) does not account for unequal time spacings. TYPE=SP(POW)(time) does.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might do both and compare the fit statistics to see which model fits your data better.&lt;/P&gt;
&lt;P&gt;When using TYPE=SP(POW)(time), you might want to use the original time values --&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;repeated/ type=sp(pow)(time)&amp;nbsp; &amp;nbsp;SUBJECT = record_id;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;For the plot, you might add OUTP=PREDDATA option in the MODEL statement in PROC MIXED. Then use PROC SGPPLOT later --&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;proc sort data=preddata; by site time; run;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;proc sgplot data=preddata;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;series y=pred x=time / group=site;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hope this helps,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Jill&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 14:27:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-type-ar-1-or-type-SP-POW-time/m-p/917369#M45521</guid>
      <dc:creator>jiltao</dc:creator>
      <dc:date>2024-02-22T14:27:47Z</dc:date>
    </item>
    <item>
      <title>Re: proc mixed, 'type=ar(1)' or 'type=SP(POW)(time)'?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-type-ar-1-or-type-SP-POW-time/m-p/917376#M45523</link>
      <description>Thanks!&lt;BR /&gt;I tried both, and they showed nearly same BIC, AICC. Does this mean that the intervals are possible equally spaced, making either approach suitable?&lt;BR /&gt;&lt;BR /&gt;PROC MIXED DATA = test METHOD = REML COVTEST ;&lt;BR /&gt;CLASS record_id site time_dichotomous(ref="0-6");&lt;BR /&gt;MODEL Score = time_dichotomous site time_dichotomous*site/ SOLUTION;&lt;BR /&gt;RANDOM INTERCEPT / SUBJECT = record_id;&lt;BR /&gt;repeated time_dichotomous / type=ar(1) sub=record_id;&lt;BR /&gt;RUN;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;PROC MIXED DATA = test METHOD = REML COVTEST ;&lt;BR /&gt;CLASS record_id time_dichotomous(ref="0-6") site;&lt;BR /&gt;MODEL Score = time_dichotomous site time_dichotomous*site/ SOLUTION;&lt;BR /&gt;RANDOM INTERCEPT / SUBJECT = record_id;&lt;BR /&gt;repeated/ type=SP(POW)(TIME_original);&lt;BR /&gt;RUN;</description>
      <pubDate>Thu, 22 Feb 2024 15:08:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-type-ar-1-or-type-SP-POW-time/m-p/917376#M45523</guid>
      <dc:creator>GiaLee</dc:creator>
      <dc:date>2024-02-22T15:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: proc mixed, 'type=ar(1)' or 'type=SP(POW)(time)'?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-type-ar-1-or-type-SP-POW-time/m-p/917396#M45526</link>
      <description>&lt;P&gt;Your second PROC MIXED program is missing subject=record_id option in the REPEATED statement.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 16:43:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-type-ar-1-or-type-SP-POW-time/m-p/917396#M45526</guid>
      <dc:creator>jiltao</dc:creator>
      <dc:date>2024-02-22T16:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: proc mixed, 'type=ar(1)' or 'type=SP(POW)(time)'?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-type-ar-1-or-type-SP-POW-time/m-p/917409#M45530</link>
      <description>Thanks for pointing out the error. I added this:&lt;BR /&gt;repeated time_dichotomous/ type=SP(POW)(TIME_JL) sub=record_id;&lt;BR /&gt;Their AIC and BIC are still nearly the same. So I believe both of them should work.</description>
      <pubDate>Thu, 22 Feb 2024 17:31:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-type-ar-1-or-type-SP-POW-time/m-p/917409#M45530</guid>
      <dc:creator>GiaLee</dc:creator>
      <dc:date>2024-02-22T17:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: proc mixed, 'type=ar(1)' or 'type=SP(POW)(time)'?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-type-ar-1-or-type-SP-POW-time/m-p/917412#M45532</link>
      <description>&lt;P&gt;yes, it seems that either model works for your data.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 17:40:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-type-ar-1-or-type-SP-POW-time/m-p/917412#M45532</guid>
      <dc:creator>jiltao</dc:creator>
      <dc:date>2024-02-22T17:40:11Z</dc:date>
    </item>
    <item>
      <title>Re: proc mixed, 'type=ar(1)' or 'type=SP(POW)(time)'?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-type-ar-1-or-type-SP-POW-time/m-p/918515#M45586</link>
      <description>Hi, may I ask you another question regarding the "type=SP(POW)(TIME_JL)"?&lt;BR /&gt;&lt;BR /&gt;I would like to test time as a continuous variable:&lt;BR /&gt;&lt;BR /&gt;PROC MIXED DATA =test METHOD = REML COVTEST ;&lt;BR /&gt; CLASS record_id age_less55;&lt;BR /&gt; MODEL Score =  time_JL age_less55  time_JL*age_less55/ SOLUTION  OUTpred=PREDDATA;&lt;BR /&gt; RANDOM INTERCEPT / SUBJECT = record_id;&lt;BR /&gt;repeated/ type=SP(POW)(TIME_JL) sub=record_id;&lt;BR /&gt; RUN;&lt;BR /&gt;&lt;BR /&gt;I'm receiving a warning message:&lt;BR /&gt;&lt;BR /&gt;WARNING: The R matrix depends on observation order within subjects. Omitting observations from the analysis because of missing values can affect this matrix. Consider using a classification effect in the REPEATED statement to determine ordering in the R matrix.&lt;BR /&gt;&lt;BR /&gt;It seems to require a classification effect after the REPEATED statement, but my time variable is continuous. Do you have any suggestions for handling this situation? Thank you!</description>
      <pubDate>Thu, 29 Feb 2024 23:05:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-type-ar-1-or-type-SP-POW-time/m-p/918515#M45586</guid>
      <dc:creator>GiaLee</dc:creator>
      <dc:date>2024-02-29T23:05:33Z</dc:date>
    </item>
    <item>
      <title>Re: proc mixed, 'type=ar(1)' or 'type=SP(POW)(time)'?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-type-ar-1-or-type-SP-POW-time/m-p/918593#M45592</link>
      <description>&lt;P&gt;You may ignore the warning message in this case.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Jill&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2024 14:13:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-type-ar-1-or-type-SP-POW-time/m-p/918593#M45592</guid>
      <dc:creator>jiltao</dc:creator>
      <dc:date>2024-03-01T14:13:01Z</dc:date>
    </item>
    <item>
      <title>Re: proc mixed, 'type=ar(1)' or 'type=SP(POW)(time)'?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-type-ar-1-or-type-SP-POW-time/m-p/918594#M45593</link>
      <description>Thank you!</description>
      <pubDate>Fri, 01 Mar 2024 14:14:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-type-ar-1-or-type-SP-POW-time/m-p/918594#M45593</guid>
      <dc:creator>GiaLee</dc:creator>
      <dc:date>2024-03-01T14:14:45Z</dc:date>
    </item>
  </channel>
</rss>

