<?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: How to specify AR(1) covariance structure in PROC NLMIXED in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-specify-AR-1-covariance-structure-in-PROC-NLMIXED/m-p/855682#M42301</link>
    <description>&lt;P&gt;Additional info:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've reviewed the example in this paper:&amp;nbsp;&lt;A href="https://www.lexjansen.com/wuss/2013/47_Paper.pdf" target="_self"&gt;https://www.lexjansen.com/wuss/2013/47_Paper.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It described the setup for the First-Order Autoregressive covariance structure (page 3), but the example that they have is a lot more complicated than my model. I don't know how to translate this into my use case (which is a linear model). Additionally, the data in the example from the paper is in a wide (cases by variables) format, which further confuses me.&lt;/P&gt;</description>
    <pubDate>Thu, 26 Jan 2023 04:32:35 GMT</pubDate>
    <dc:creator>diametra</dc:creator>
    <dc:date>2023-01-26T04:32:35Z</dc:date>
    <item>
      <title>How to specify AR(1) covariance structure in PROC NLMIXED</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-specify-AR-1-covariance-structure-in-PROC-NLMIXED/m-p/855673#M42300</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to expand on a topic that was discussed in this &lt;A href="https://communities.sas.com/t5/Statistical-Procedures/PROC-Mixed-treatment-effect-percentage-change/td-p/729065" target="_self"&gt;thread&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the mixed-effects repeated measures model that I'm working with:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc mixed data = analysis;&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;class SubjectID Treatment Visit;&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;model AVAL = Treatment Visit Treatment*Visit / s;&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;repeated / subject = SubjectID &lt;FONT color="#3366FF"&gt;type = AR(1)&lt;/FONT&gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are 2 treatment groups and 4 visits (Baseline, Month 1, Month 3, and Month 6). My goal is to estimate the Percentage Change between Month 6 and Baseline for each treatment group. In this &lt;A href="https://communities.sas.com/t5/Statistical-Procedures/PROC-Mixed-treatment-effect-percentage-change/td-p/729065" target="_self"&gt;thread&lt;/A&gt;, &lt;STRONG&gt;PROC NLMIXED&lt;/STRONG&gt; was suggested as a method to estimate for the Percentage Change. I followed the example from the thread to build the following model:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc nlmixed data = analysis;&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;parms b0=2 b1=0.5 b2=1.2 b3=1.2 b4=1.2 b5=1.2 b6=1.2 b7=1.2 sb=2 se=1;&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;mu = b0 + b1*(Treatment="Active") + b2*(Visit="Month 1") + b3*(Visit="Month 3") + b4*(Visit="Month 6")&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-90px"&gt;&lt;STRONG&gt;+ b5*(Treatment="Active")*(Visit="Month 1") + b6*(Treatment="Active")*(Visit="Month 3") + b7*(Treatment="Active")*(Visit="Month 6") + u;&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;model AVAL ~ normal(mu, se);&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;random u ~ normal(0, sb) subject=SubjectID;&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;estimate 'Percentage Difference between Month 6 and Baseline for Active' ((b4 + b7)/(b0 + b1))*100;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My question is: How would I specify the AR(1) covariance structure as I did in PROC MIXED using PROC NLMIXED?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help or suggestions would be greatly appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Diana&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2023 01:55:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-specify-AR-1-covariance-structure-in-PROC-NLMIXED/m-p/855673#M42300</guid>
      <dc:creator>diametra</dc:creator>
      <dc:date>2023-01-26T01:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to specify AR(1) covariance structure in PROC NLMIXED</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-specify-AR-1-covariance-structure-in-PROC-NLMIXED/m-p/855682#M42301</link>
      <description>&lt;P&gt;Additional info:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've reviewed the example in this paper:&amp;nbsp;&lt;A href="https://www.lexjansen.com/wuss/2013/47_Paper.pdf" target="_self"&gt;https://www.lexjansen.com/wuss/2013/47_Paper.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It described the setup for the First-Order Autoregressive covariance structure (page 3), but the example that they have is a lot more complicated than my model. I don't know how to translate this into my use case (which is a linear model). Additionally, the data in the example from the paper is in a wide (cases by variables) format, which further confuses me.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2023 04:32:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-specify-AR-1-covariance-structure-in-PROC-NLMIXED/m-p/855682#M42301</guid>
      <dc:creator>diametra</dc:creator>
      <dc:date>2023-01-26T04:32:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to specify AR(1) covariance structure in PROC NLMIXED</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-specify-AR-1-covariance-structure-in-PROC-NLMIXED/m-p/855880#M42309</link>
      <description>&lt;P&gt;1. AR(1) is often used in the REPEATED statement in PROC MIXED.&lt;/P&gt;
&lt;P&gt;There is no REPEATED statement in PROC NLMIXED. The RANDOM statement in PROC NLMIXED is like fitting a random coefficients model, and AR(1) is almost never used to model the covariance between random intercept and slopes.&lt;/P&gt;
&lt;P&gt;2. If for a reason beyond my understanding, you have to specify an AR(1) structure in PROC NLMIXED, then&lt;/P&gt;
&lt;P&gt;you would need to have at least 3 random effects (u0, u1, and u2) in order for AR(1) to make sense. For example,&lt;/P&gt;
&lt;P&gt;random u0 u1 u2 ~ normal([0, 0, 0],[s2, s2*rho, s2, s2*rho**2, s2*rho, s2]) subject=subject;&lt;/P&gt;
&lt;P&gt;where s2 and rho are your model parameters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;Jill&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 00:27:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-specify-AR-1-covariance-structure-in-PROC-NLMIXED/m-p/855880#M42309</guid>
      <dc:creator>jiltao</dc:creator>
      <dc:date>2023-01-27T00:27:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to specify AR(1) covariance structure in PROC NLMIXED</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-specify-AR-1-covariance-structure-in-PROC-NLMIXED/m-p/886936#M43874</link>
      <description>&lt;P&gt;Hi, if I have a correlated longitudinal model with one continuous outcome and one ordinal outcome (using probit normal to define category), say y1it = Xalphai + b1i + e_{1it}, y2it (latent normal) = Xbetai + b2i+e_{2it}, (b1i,b2i) are bivariate normal distribution, and (e_{1it},e_{2it})are random error that also have bivariate normal distribution (correlated). (the variance parameter is&amp;nbsp; (sigcon, rhoe*sigcon*sigord, sigord)). How should I specify the "rhoe" here? I attach my SAS code here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC NLMIXED data=auto2 qpoints=10 tech = NMSIMP corr ecorr;&lt;BR /&gt;PARMS beta0=6 beta1=-3 beta2=0 alpha0=25&lt;BR /&gt;alpha1=-10 alpha2=-1 sigcon = 2 sigor = 3 rhob=0.3 i1 = 2 i2=2 &lt;STRONG&gt;rhoe = 0.4&lt;/STRONG&gt;;&lt;BR /&gt;bounds i1 &amp;gt; 0, i2 &amp;gt; 0;&lt;BR /&gt;if variable="continuous" then do;&lt;BR /&gt;pi=constant("pi");&lt;BR /&gt;m1=alpha0+alpha1*trt+alpha2*time+z1;&lt;BR /&gt;LL1=((-0.5)*log(2*pi*sigcon*sigcon)-((value1-m1)**2)/&lt;BR /&gt;(2*sigcon*sigcon));&lt;BR /&gt;END;&lt;BR /&gt;if variable="ordinal" then do;&lt;BR /&gt;eta = beta0+beta1*trt+beta2*time+z2;&lt;BR /&gt;if (value1=1) then p = probnorm(-eta/sigor);&lt;BR /&gt;else if (value1=2) then&lt;BR /&gt;p = probnorm((i1-eta)/sigor) - probnorm(-eta/sigor);&lt;BR /&gt;else if (value1=3) then&lt;BR /&gt;p = probnorm((i1+i2-eta)/sigor) - probnorm((i1-eta)/sigor);&lt;BR /&gt;else p = 1 - probnorm((i1+i2-eta)/sigor);&lt;BR /&gt;if (p &amp;gt; 1e-8) then LL2 = log(p);&lt;BR /&gt;else LL2 = -1e20;&lt;BR /&gt;END;&lt;BR /&gt;LL=LL1+LL2;&lt;BR /&gt;MODEL value1 ~ GENERAL(LL);&lt;BR /&gt;RANDOM z1 z2 ~ NORMAL([0,0],[1,rhob,1]) SUBJECT=id;&lt;BR /&gt;estimate "sigma2" sigor*sigor;&lt;BR /&gt;ods output ParameterEstimates=pars;&lt;BR /&gt;ods output FitStatistics=aic;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My question is where should I specify rhoe here? I thought it should be similar like type = "un"...&lt;/P&gt;</description>
      <pubDate>Sat, 29 Jul 2023 03:17:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-specify-AR-1-covariance-structure-in-PROC-NLMIXED/m-p/886936#M43874</guid>
      <dc:creator>lcw68</dc:creator>
      <dc:date>2023-07-29T03:17:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to specify AR(1) covariance structure in PROC NLMIXED</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-specify-AR-1-covariance-structure-in-PROC-NLMIXED/m-p/887013#M43887</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Previous reply by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/446313"&gt;@lcw68&lt;/a&gt;&amp;nbsp;can be neglected.&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/446313"&gt;@lcw68&lt;/a&gt;&amp;nbsp;has rightfully opened a new post (new topic) in this board with his / her question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See:&lt;/P&gt;
&lt;P&gt;How to incorporate correlation between random error (epsilon) in proc nlmixed joint MMRM model?&lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/Statistical-Procedures/How-to-incorporate-correlation-between-random-error-epsilon-in/m-p/886937#M43875" target="_blank"&gt;https://communities.sas.com/t5/Statistical-Procedures/How-to-incorporate-correlation-between-random-error-epsilon-in/m-p/886937#M43875&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Sun, 30 Jul 2023 13:17:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-specify-AR-1-covariance-structure-in-PROC-NLMIXED/m-p/887013#M43887</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2023-07-30T13:17:12Z</dc:date>
    </item>
  </channel>
</rss>

