<?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: Execution error for observation 97 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Execution-error-for-observation-97/m-p/738541#M230397</link>
    <description>&lt;P&gt;Typically, this means that the procedure can't perform the math. Example: you can't use the LOG() function on a negative number or a zero value.&lt;/P&gt;</description>
    <pubDate>Mon, 03 May 2021 11:08:55 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2021-05-03T11:08:55Z</dc:date>
    <item>
      <title>Execution error for observation 97</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Execution-error-for-observation-97/m-p/738527#M230387</link>
      <description>&lt;P&gt;Hi there&lt;/P&gt;&lt;P&gt;I wanted to apply proc nlmixed on real data but I got this error:&amp;nbsp; Execution error for observation 97.&lt;/P&gt;&lt;P&gt;Is there any body here to help me how to solve it?&lt;/P&gt;&lt;P&gt;Best wish&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc nlmixed data=data qpoints=10 gconv=1e-2;&lt;BR /&gt;bounds 0 &amp;lt;=sigma2;&lt;BR /&gt;/* Initail Values ---------------- */&lt;BR /&gt;parms a0=5.3 a1=1.3&lt;BR /&gt;b0=14.3 b1=0.01 b2=0.2 b3=2.5&lt;BR /&gt;g1=1.1 g2=-0.1 g3=0.5&lt;BR /&gt;sigma2=1&lt;BR /&gt;l1=1 l2=2 l3=3 k=0.01;&lt;/P&gt;&lt;P&gt;/* Log Likelihood ---------------- */&lt;BR /&gt;if t=0 then do;&lt;BR /&gt;lam = exp(g1*GENDER + g2*AGE +g3*CITY + l2*a + l3*b);&lt;BR /&gt;loglik=(censored=0)*(log(lam)-lam * time) + (censored=1)*(-lam * time);&lt;BR /&gt;end;&lt;BR /&gt;else do;&lt;BR /&gt;pi = 1/(1 + exp(-(a0 + a1*ADTYPE + a)));&lt;BR /&gt;eta = abs(k)**(-2);&lt;BR /&gt;mu = b0 + b1*ADTYPE +b2*AGE +b3*GENDER - log(pi)-sigma2*log(k**2)/k-lgamma(eta*(k+k*sigma2))+lgamma(eta) + l1*a + b;&lt;BR /&gt;u = sign(k)*(log(Y) - mu)/sigma2;&lt;BR /&gt;if Y=0 then loglik=log(1-pi);&lt;BR /&gt;else if Y&amp;gt;0 then loglik=log(pi)- lgamma(eta) + eta*log(eta) - log(sigma2) - log(Y) + u*sqrt(eta) - eta*exp(abs(k)*u);&lt;BR /&gt;else if Y = . then loglik=0;&lt;BR /&gt;end;&lt;/P&gt;&lt;P&gt;model ID ~ general(loglik);&lt;BR /&gt;random a b ~ normal([0,0], [1, 0, 1]) subject=ID;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 May 2021 10:04:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Execution-error-for-observation-97/m-p/738527#M230387</guid>
      <dc:creator>m_hojai82</dc:creator>
      <dc:date>2021-05-03T10:04:06Z</dc:date>
    </item>
    <item>
      <title>Re: Execution error for observation 97</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Execution-error-for-observation-97/m-p/738541#M230397</link>
      <description>&lt;P&gt;Typically, this means that the procedure can't perform the math. Example: you can't use the LOG() function on a negative number or a zero value.&lt;/P&gt;</description>
      <pubDate>Mon, 03 May 2021 11:08:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Execution-error-for-observation-97/m-p/738541#M230397</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-05-03T11:08:55Z</dc:date>
    </item>
    <item>
      <title>Re: Execution error for observation 97</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Execution-error-for-observation-97/m-p/738544#M230399</link>
      <description>Thank you for reply? So where is the problem? In formula or initial parameters or both?&lt;BR /&gt;Thank you again.</description>
      <pubDate>Mon, 03 May 2021 11:11:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Execution-error-for-observation-97/m-p/738544#M230399</guid>
      <dc:creator>m_hojai82</dc:creator>
      <dc:date>2021-05-03T11:11:41Z</dc:date>
    </item>
    <item>
      <title>Re: Execution error for observation 97</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Execution-error-for-observation-97/m-p/738554#M230404</link>
      <description>&lt;P&gt;You have the data.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need to trace through the code using data from observation 97 to see where a problem could happen. I can't do that for you.&lt;/P&gt;</description>
      <pubDate>Mon, 03 May 2021 11:34:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Execution-error-for-observation-97/m-p/738554#M230404</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-05-03T11:34:32Z</dc:date>
    </item>
    <item>
      <title>Re: Execution error for observation 97</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Execution-error-for-observation-97/m-p/738556#M230405</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/380632"&gt;@m_hojai82&lt;/a&gt;&amp;nbsp;and welcome to the SAS Support Communities!&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/380632"&gt;@m_hojai82&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;So where is the problem? In formula or initial parameters or both?&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;[and earlier:]&lt;/P&gt;
&lt;BLOCKQUOTE&gt;...
&lt;P&gt;u = sign(k)*(log(Y) - mu)/sigma2;&lt;BR /&gt;if Y=0 then ...&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I guess the term &lt;FONT face="courier new,courier"&gt;log(Y)&lt;/FONT&gt; in the definition of &lt;FONT face="courier new,courier"&gt;u&lt;/FONT&gt; is a good candidate since you consider the case Y=0 immediately afterwards.&lt;/P&gt;</description>
      <pubDate>Mon, 03 May 2021 11:43:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Execution-error-for-observation-97/m-p/738556#M230405</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2021-05-03T11:43:00Z</dc:date>
    </item>
    <item>
      <title>Re: Execution error for observation 97</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Execution-error-for-observation-97/m-p/738557#M230406</link>
      <description>Actually I applied this code for log-normal distribution before and I wanted to use generalized gamma distribution instead of LN. As you know LN is a special case of GG when 𝑘 → 0. I applied different amount of K and I got the same error but in different observation. for K near 0 I got this error for observation 97 (Y=0) but for K=500 I got this error for observation 1. I applied LN before on my data so it supposed to get the same result when 𝑘 → 0. anyway thank you for your response. As you said I need to track.</description>
      <pubDate>Mon, 03 May 2021 11:46:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Execution-error-for-observation-97/m-p/738557#M230406</guid>
      <dc:creator>m_hojai82</dc:creator>
      <dc:date>2021-05-03T11:46:48Z</dc:date>
    </item>
  </channel>
</rss>

