<?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 problem in PROC NLMIXED in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/A-problem-in-PROC-NLMIXED/m-p/195168#M10395</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am going to wager on sample size as the driver here.&amp;nbsp; While the point estimates don't look very good, what do the interval estimates look like--are your priors covered by the interval?&amp;nbsp; If so, then it may be just a matter of increasing the number of cases simulated in order to get adequate estimates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It could well be something else that is not apparent right away to me, but this would be my first cut at the behavior.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Jun 2015 13:30:09 GMT</pubDate>
    <dc:creator>SteveDenham</dc:creator>
    <dc:date>2015-06-01T13:30:09Z</dc:date>
    <item>
      <title>A problem in PROC NLMIXED</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/A-problem-in-PROC-NLMIXED/m-p/195163#M10390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Everybody,&lt;/P&gt;&lt;P&gt;I have a problem with my codes in PROC NLMIXED. I have seen similar question on internet and their answers. But non of them worked for me!&lt;/P&gt;&lt;P&gt;My dataset is simulated and it's not real. The data has a one-level structure identified by cluster_id. Outcome is time to event with weibull distribution (here called survival_t). I have 4 independent covariates.&lt;/P&gt;&lt;P&gt;Codes are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc nlmixed data=data qpoints=30 noad;&lt;/P&gt;&lt;P&gt;bounds rho &amp;gt; 0 ;&lt;/P&gt;&lt;P&gt;parms rho=5 b1=0 b2=0 b3=0 b4=0 &lt;SPAN style="font-size: 13.3333330154419px;"&gt;logsig&lt;/SPAN&gt;=1;&lt;/P&gt;&lt;P&gt;eta = b0 + b1 * covariate1 + b2 * covariate2 + b3 * covariate3&amp;nbsp; + b4 * covariate4 + W;&lt;/P&gt;&lt;P&gt;lambda = exp(eta);&lt;/P&gt;&lt;P&gt;G_t = exp(-(lambda *survival_t) ** rho);&lt;/P&gt;&lt;P&gt;g = rho*lambda_c*((lambda *survival_t) ** (rho-1))*G_t;&lt;/P&gt;&lt;P&gt;ll = (censorship=1)*log(g) + (censorship=0)*log(G_t);&lt;/P&gt;&lt;P&gt;model survival_t ~ general(ll);&lt;/P&gt;&lt;P&gt;random W ~ normal(0,exp(2*logsig)) subject=cluster_id ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is no error, but a NOTE:&lt;/P&gt;&lt;P&gt;NOTE: Execution error for observation 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The answers I have found online are:&lt;/P&gt;&lt;P&gt;1) Convert the codes to DATASTEP to see what the problem is: I did so and I found no problem..&lt;/P&gt;&lt;P&gt;2) Check if the outcome contains zero: It does not contain any zero value (you can check from the attached.)&lt;/P&gt;&lt;P&gt;3) Log of no zero or negative value is taken....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really appreciate any help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2015 14:13:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/A-problem-in-PROC-NLMIXED/m-p/195163#M10390</guid>
      <dc:creator>Mehdi_R</dc:creator>
      <dc:date>2015-05-28T14:13:56Z</dc:date>
    </item>
    <item>
      <title>Re: A problem in PROC NLMIXED</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/A-problem-in-PROC-NLMIXED/m-p/195164#M10391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Probably one of the calls to the EXP function is overflowing. For example, if ETA or the expression for G_t is moderately large (greater than constant('logbig')=709), then the EXP function overflows during the first pass through the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is also a good idea to give default values for ALL parameters.&amp;nbsp; You've omitted b) and lambda_c, which get set to 1 by the PROC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking at the expression in the G_t assignment, I suggest making the coefficients for ETA small, and the power RHO small. Probably RHO is the culprit. The following initial conditions seem to work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt; font-family: Courier New;"&gt;parms rho=&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 14pt; font-family: Courier New;"&gt;2&lt;/STRONG&gt;&lt;SPAN style="font-size: 14pt; font-family: Courier New;"&gt; b1=&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 14pt; font-family: Courier New;"&gt;0&lt;/STRONG&gt;&lt;SPAN style="font-size: 14pt; font-family: Courier New;"&gt; b2=&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 14pt; font-family: Courier New;"&gt;0&lt;/STRONG&gt;&lt;SPAN style="font-size: 14pt; font-family: Courier New;"&gt; b3=&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 14pt; font-family: Courier New;"&gt;0&lt;/STRONG&gt;&lt;SPAN style="font-size: 14pt; font-family: Courier New;"&gt; b4=&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 14pt; font-family: Courier New;"&gt;0&lt;/STRONG&gt;&lt;SPAN style="font-size: 14pt; font-family: Courier New;"&gt; logsig=&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 14pt; font-family: Courier New;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 14pt; font-family: Courier New;"&gt; b0=&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 14pt; font-family: Courier New;"&gt;0&lt;/STRONG&gt;&lt;SPAN style="font-size: 14pt; font-family: Courier New;"&gt; lambda_c=&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 14pt; font-family: Courier New;"&gt;0.01&lt;/STRONG&gt;&lt;SPAN style="font-size: 14pt; font-family: Courier New;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2015 15:06:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/A-problem-in-PROC-NLMIXED/m-p/195164#M10391</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2015-05-28T15:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: A problem in PROC NLMIXED</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/A-problem-in-PROC-NLMIXED/m-p/195165#M10392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Rick. You're wonderful and your answers are always correct:)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2015 15:40:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/A-problem-in-PROC-NLMIXED/m-p/195165#M10392</guid>
      <dc:creator>Mehdi_R</dc:creator>
      <dc:date>2015-05-28T15:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: A problem in PROC NLMIXED</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/A-problem-in-PROC-NLMIXED/m-p/195166#M10393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rick. I have a question related to this code. Your answer was correct, by the way, and I can see the results (previously I couldn't have estimation). However, the parameter estimates are wrong (especially regression parameters). Noted that I'm doing simulation study so I know exact values of the parameters. I've generated one-level survival data with weibull baseline and normal random effects.&lt;/P&gt;&lt;P&gt;The true values of parameters are:&lt;/P&gt;&lt;P&gt;rho=5 lambda=2 b1=2 b2=1.5 b3=.4 b4=-1 sigma2=3;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But estimates are: rho=4.1388 lambda=exp(-0.1536) b1= b2=&lt;SPAN style="font-size: 13.3333330154419px;"&gt;0.3353&lt;/SPAN&gt; b3=-0.06213 b4=-0.2256 sigma2=exp(2*-0.8578);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The strange part is that the codes work for SAS datasets and other online dataset (So codes are correct). On the other hand, semiparametric frailty model and other models work satisfactory for my simulated data (So simulation is done correctly). BUT these codes (parametric frailty model with weibull baseline and normal frailties) do not work for my simulated data. What do you think about this? I'm sure that I'm missing something here but whatever I think I cannot get the point...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The codes are copied bellow and the data is attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc nlmixed data=Survival_MultiLevel qpoints=5 noad;&lt;/P&gt;&lt;P&gt;bounds rho &amp;gt; 0 ;&lt;/P&gt;&lt;P&gt;parms rho=1 b1=0 b2=0 b3=.4 b4=-1 logsig=.6 b0=1;&lt;/P&gt;&lt;P&gt;eta = b0 + b1*covariate1 + b2*covariate2 + b3*covariate3&amp;nbsp; + b4*covariate4 + W; /*b0 is log of weibull scale parameters.*/&lt;/P&gt;&lt;P&gt;lambda = exp(eta);&lt;/P&gt;&lt;P&gt;S_t = exp(-(lambda*survival_t)**rho);&lt;/P&gt;&lt;P&gt;h = rho*lambda*((lambda*survival_t)**(rho-1))*S_t;&lt;/P&gt;&lt;P&gt;ll = (censorship=1)*log(h) + (censorship=0)*log(S_t);&lt;/P&gt;&lt;P&gt;model survival_t ~ general(ll);&lt;/P&gt;&lt;P&gt;random W ~ normal(0,exp(2*logsig)) subject=cluster_id ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 May 2015 18:18:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/A-problem-in-PROC-NLMIXED/m-p/195166#M10393</guid>
      <dc:creator>Mehdi_R</dc:creator>
      <dc:date>2015-05-30T18:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: A problem in PROC NLMIXED</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/A-problem-in-PROC-NLMIXED/m-p/195167#M10394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Rick,&lt;/P&gt;&lt;P&gt;Regarding the question I posted some hours ago, I think I solve the issue myself. When I write the log of the likelihood in another way, I get precise results. The formula I'm using is: L=(h(t)^censorship)*S(t). It seems this way of writing the likelihood decreases the computational burden... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;proc nlmixed data=data qpoints=5 noad;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;bounds rho &amp;gt; 0 ;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;parms rho=1 b1=0 b2=0 b3=.4 b4=-1 logsig=.6 b0=1;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;eta = b0 + b1*covariate1 + b2*covariate2 + b3*covariate3&amp;nbsp; + b4*covariate4 + W; /*b0 is log of weibull scale parameters.*/&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;lambda = exp(eta);&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P&gt;log_S_t = -lambda*(survival_t**rho);&lt;/P&gt;&lt;P&gt;log_h=(&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #ffffff;"&gt;censorship&lt;/SPAN&gt;=1)*(eta+log(rho)+(rho-1)*log(survival_t));&lt;/P&gt;&lt;P&gt;ll = log_h+log_S_t;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;model survival_t ~ general(ll);&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;random W ~ normal(0,exp(2*logsig)) subject=cluster_id ;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 31 May 2015 06:00:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/A-problem-in-PROC-NLMIXED/m-p/195167#M10394</guid>
      <dc:creator>Mehdi_R</dc:creator>
      <dc:date>2015-05-31T06:00:34Z</dc:date>
    </item>
    <item>
      <title>Re: A problem in PROC NLMIXED</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/A-problem-in-PROC-NLMIXED/m-p/195168#M10395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am going to wager on sample size as the driver here.&amp;nbsp; While the point estimates don't look very good, what do the interval estimates look like--are your priors covered by the interval?&amp;nbsp; If so, then it may be just a matter of increasing the number of cases simulated in order to get adequate estimates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It could well be something else that is not apparent right away to me, but this would be my first cut at the behavior.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2015 13:30:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/A-problem-in-PROC-NLMIXED/m-p/195168#M10395</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2015-06-01T13:30:09Z</dc:date>
    </item>
    <item>
      <title>Re: A problem in PROC NLMIXED</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/A-problem-in-PROC-NLMIXED/m-p/195169#M10396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2015 13:59:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/A-problem-in-PROC-NLMIXED/m-p/195169#M10396</guid>
      <dc:creator>Mehdi_R</dc:creator>
      <dc:date>2015-06-01T13:59:44Z</dc:date>
    </item>
  </channel>
</rss>

