<?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: A joint model using PROC NLMIXED in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/A-joint-model-using-PROC-NLMIXED/m-p/374943#M19655</link>
    <description>&lt;P&gt;Thank you for the reply&lt;/P&gt;&lt;P&gt;I tried your suggestion and tried a grid of starting values&amp;nbsp;&amp;nbsp;but still&amp;nbsp;didn't work!&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was wondering if this likelihood is so complicated to evaluated by NLMIXED!&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/14066iB0D09241274CFE15/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="SGPlot1.png" title="SGPlot1.png" /&gt;</description>
    <pubDate>Tue, 11 Jul 2017 13:27:21 GMT</pubDate>
    <dc:creator>MunaSmith</dc:creator>
    <dc:date>2017-07-11T13:27:21Z</dc:date>
    <item>
      <title>A joint model using PROC NLMIXED</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/A-joint-model-using-PROC-NLMIXED/m-p/371371#M19484</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a problem in fitting the following&amp;nbsp;&amp;nbsp;joint model for binary and longitudinal outcome using NLMIXED, the concept that I want to predict the probability of developing a medical condition (which is HT&amp;nbsp;in this model ) based on&amp;nbsp;a set of weekly measuremnts of a biomarker (Y). the joint model consists of&amp;nbsp;two parts the first one is a mixed model to summarize the biomarker and a logistic model to obtain the predicted probabilties .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc nlmixed data=data qpoints=1;&lt;BR /&gt;parameters beta0= 2.5 beta1= -0.22&lt;BR /&gt;a11= 0.34 a12= -0.01 a22=0.03&lt;BR /&gt;alpha0=10 alpha1=10 alpha2=10 s2=0.03;&lt;/P&gt;&lt;P&gt;*the variance covariance matrix;&lt;BR /&gt;v11 = a11*a11;&lt;BR /&gt;v12 = a11*a12;&lt;BR /&gt;v22 = a12*a12 + a22*a22;&lt;/P&gt;&lt;P&gt;*The longitudinal model ;&lt;BR /&gt;linplong = (beta0 + u1) + (beta1 + u2)*time;&lt;BR /&gt;resid = (y-linplong);&lt;/P&gt;&lt;P&gt;lllong = -0.5*(1.837876 + resid**2 / s2 + log(s2));&lt;/P&gt;&lt;P&gt;*The binary model;&lt;BR /&gt;xb=alpha0+alpha1*u1+alpha2*u2;&lt;BR /&gt;prob = exp(xb)/(1+exp(xb));&lt;BR /&gt;liklhd = (prob**HT)*((1-prob)**(1-HT));&lt;BR /&gt;llbin = log(liklhd);&lt;/P&gt;&lt;P&gt;model HT&amp;nbsp;~ general(lllong + llbin);&lt;BR /&gt;random u1 u2 ~ normal([0, 0],[v11,v12,v22]) subject=id;&lt;/P&gt;&lt;P&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;The above model fails to converge and I get the following error msg&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR: No valid parameter points were found&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;any ideas of what might be wrong in the above code !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The first 5 subjects in the data&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;id &amp;nbsp;y &amp;nbsp;HT&amp;nbsp;time&lt;BR /&gt;9 2,1 0 2&lt;BR /&gt;9 1,42 0 3&lt;BR /&gt;9 1,08 0 4&lt;BR /&gt;9 0,95 0 5&lt;BR /&gt;9 0,73 0 6&lt;BR /&gt;9 0,34 0 7&lt;BR /&gt;10 NA 0 2&lt;BR /&gt;10 NA 0 3&lt;BR /&gt;10 NA 0 4&lt;BR /&gt;10 NA 0 5&lt;BR /&gt;10 NA 0 6&lt;BR /&gt;10 2,15 0 7&lt;BR /&gt;11 NA 0 2&lt;BR /&gt;11 NA 0 3&lt;BR /&gt;11 NA 0 4&lt;BR /&gt;11 NA 0 5&lt;BR /&gt;11 NA 0 6&lt;BR /&gt;11 NA 0 7&lt;BR /&gt;12 NA 0 2&lt;BR /&gt;12 NA 0 3&lt;BR /&gt;12 1,67 0 4&lt;BR /&gt;12 1,6 0 5&lt;BR /&gt;12 1,51 0 6&lt;BR /&gt;12 1,04 0 7&lt;BR /&gt;13 NA 0 2&lt;BR /&gt;13 NA 0 3&lt;BR /&gt;13 NA 0 4&lt;BR /&gt;13 0,11 0 5&lt;BR /&gt;13 NA 0 6&lt;BR /&gt;13 NA 0 7&lt;BR /&gt;14 2,56 1 2&lt;BR /&gt;14 2,08 1 3&lt;BR /&gt;14 1,88 1 4&lt;BR /&gt;14 1,79 1 5&lt;BR /&gt;14 1,74 1 6&lt;BR /&gt;14 NA 1 7&lt;BR /&gt;15 NA 1 2&lt;BR /&gt;15 NA 1 3&lt;BR /&gt;15 NA 1 4&lt;BR /&gt;15 2,41 1 5&lt;BR /&gt;15 2,43 1 6&lt;BR /&gt;15 NA 1 7&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jun 2017 16:50:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/A-joint-model-using-PROC-NLMIXED/m-p/371371#M19484</guid>
      <dc:creator>MunaSmith</dc:creator>
      <dc:date>2017-06-28T16:50:06Z</dc:date>
    </item>
    <item>
      <title>Re: A joint model using PROC NLMIXED</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/A-joint-model-using-PROC-NLMIXED/m-p/372159#M19488</link>
      <description>&lt;P&gt;First, check that the&amp;nbsp;data set is created properly. One way is to plot the response for each subject over time:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=data noautolegend;
series x=time y=y / group=id grouplc=HT;  /* GROUPLC= option requires recent version of SAS */
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Next, I think you need to use the BOUNDS statement to bound some of the variance parameters. Lastly, try different initial values for the regression parameters. For example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc nlmixed data=data;&lt;BR /&gt;parameters beta0= 2.5 beta1= -0.22&lt;BR /&gt;a11= 0.34 a12= -0.01 a22=0.03&lt;BR /&gt;&lt;STRONG&gt;alpha0=1 alpha1=1 alpha2=1&lt;/STRONG&gt; s2=0.03;&lt;BR /&gt;&lt;STRONG&gt;bounds 0 &amp;lt; a11, a12, a22, s2;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2017 13:44:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/A-joint-model-using-PROC-NLMIXED/m-p/372159#M19488</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-06-30T13:44:00Z</dc:date>
    </item>
    <item>
      <title>Re: A joint model using PROC NLMIXED</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/A-joint-model-using-PROC-NLMIXED/m-p/374943#M19655</link>
      <description>&lt;P&gt;Thank you for the reply&lt;/P&gt;&lt;P&gt;I tried your suggestion and tried a grid of starting values&amp;nbsp;&amp;nbsp;but still&amp;nbsp;didn't work!&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was wondering if this likelihood is so complicated to evaluated by NLMIXED!&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/14066iB0D09241274CFE15/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="SGPlot1.png" title="SGPlot1.png" /&gt;</description>
      <pubDate>Tue, 11 Jul 2017 13:27:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/A-joint-model-using-PROC-NLMIXED/m-p/374943#M19655</guid>
      <dc:creator>MunaSmith</dc:creator>
      <dc:date>2017-07-11T13:27:21Z</dc:date>
    </item>
    <item>
      <title>Re: A joint model using PROC NLMIXED</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/A-joint-model-using-PROC-NLMIXED/m-p/374953#M19656</link>
      <description>&lt;P&gt;Most non-convergence issues are caused because the model is either specified incorrectly or the model does not fit the data.&lt;/P&gt;
&lt;P&gt;If you post the NLMIXED code and the data AS A SAS DATA STEP, the issue will be easier to investigate.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2017 13:42:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/A-joint-model-using-PROC-NLMIXED/m-p/374953#M19656</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-07-11T13:42:47Z</dc:date>
    </item>
    <item>
      <title>Re: A joint model using PROC NLMIXED</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/A-joint-model-using-PROC-NLMIXED/m-p/375482#M19679</link>
      <description>&lt;P&gt;Thank you !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I uploaded the data set in attachemnt and here is the final code&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Libname cls "C:\Users\user\Desktop";&lt;/P&gt;&lt;P&gt;proc import datafile="C:\Users\user\Desktop\book1.csv"&lt;BR /&gt;OUT= cls.data&lt;BR /&gt;DBMS=csv&lt;BR /&gt;REPLACE;&lt;BR /&gt;GETNAMES=YES;&lt;BR /&gt;RUN;*Please find the attached csv file;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc nlmixed data=cls.data ;&lt;BR /&gt;parameters beta0= 2.5 beta1=-0.22&lt;BR /&gt;a11= 0.59 a12= -0.11 a22=0.18&lt;BR /&gt;alpha0=-1.38 alpha1=0.42 alpha2=21.32 s2=0.03;&lt;BR /&gt;bounds 0 &amp;lt; a11, a22, s2;&lt;/P&gt;&lt;P&gt;*The longitudinal model;&lt;BR /&gt;linplong = (beta0 + u1) + (beta1 + u2)*time;&lt;BR /&gt;resid = (y-linplong);&lt;BR /&gt;if (abs(resid) &amp;gt; 1.3E100) or (s2 &amp;lt; 1e-12) then do;&lt;BR /&gt;lllong = -1e20;&lt;BR /&gt;end; else do;&lt;BR /&gt;lllong = -0.5*(1.837876 + resid**2 / s2 + log(s2));&lt;BR /&gt;end;&lt;BR /&gt;*The logistic model;&lt;BR /&gt;xb=alpha0+alpha1*u1+alpha2*u2;&lt;BR /&gt;prob = exp(xb)/(1+exp(xb));&lt;BR /&gt;liklhd = (prob**HT)*((1-prob)**(1-HT));&lt;BR /&gt;llbin = log(liklhd);&lt;/P&gt;&lt;P&gt;model HT ~ general(lllong + llbin);&lt;BR /&gt;random u1 u2 ~ normal([0, 0],[a11,a12,a22]) subject=id;&lt;/P&gt;&lt;P&gt;run;&lt;BR /&gt;title1;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2017 19:53:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/A-joint-model-using-PROC-NLMIXED/m-p/375482#M19679</guid>
      <dc:creator>MunaSmith</dc:creator>
      <dc:date>2017-07-12T19:53:37Z</dc:date>
    </item>
  </channel>
</rss>

