<?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 Problem with calculating MLE using NLPNRA in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Problem-with-calculating-MLE-using-NLPNRA/m-p/72618#M449</link>
    <description>Could somebody please tell me what I did wrong? Thanks.&lt;BR /&gt;
&lt;BR /&gt;
I am trying to get MLE for exponential duration model using NLPNRA in proc IML. I followed the example of Rosenbrock function in SAS/IML software reference. I got the error message "ERROR: (execution) Matrix has not been set to a value." exp is the data set imported. t is the variable in the data set that are the random numbers generated from an exponential distribution.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
%macro test(dsn=,x=);&lt;BR /&gt;
proc iml;&lt;BR /&gt;
reset noname;&lt;BR /&gt;
use &amp;amp;dsn;&lt;BR /&gt;
read all var {&amp;amp;x} into tt;&lt;BR /&gt;
print tt;&lt;BR /&gt;
&lt;BR /&gt;
start LL(beta);&lt;BR /&gt;
f=sum(log(beta)-beta*tt);&lt;BR /&gt;
return(f);&lt;BR /&gt;
finish LL;&lt;BR /&gt;
&lt;BR /&gt;
start grad(beta);&lt;BR /&gt;
g=j(1,1,0);&lt;BR /&gt;
g=sum(1/beta-tt);&lt;BR /&gt;
return(g);&lt;BR /&gt;
finish grad;&lt;BR /&gt;
&lt;BR /&gt;
start hess(beta);&lt;BR /&gt;
h=j(1,1,0);&lt;BR /&gt;
h=-100/(beta*beta);&lt;BR /&gt;
return(h);&lt;BR /&gt;
finish hess;&lt;BR /&gt;
&lt;BR /&gt;
beta=1;&lt;BR /&gt;
call NLPNRA(rc,xr,"LL",beta)grd="grad" hes="hess";&lt;BR /&gt;
%mend;&lt;BR /&gt;
&lt;BR /&gt;
%test(dsn=exp,x=t);</description>
    <pubDate>Tue, 30 Mar 2010 23:15:00 GMT</pubDate>
    <dc:creator>wy_CA</dc:creator>
    <dc:date>2010-03-30T23:15:00Z</dc:date>
    <item>
      <title>Problem with calculating MLE using NLPNRA</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Problem-with-calculating-MLE-using-NLPNRA/m-p/72618#M449</link>
      <description>Could somebody please tell me what I did wrong? Thanks.&lt;BR /&gt;
&lt;BR /&gt;
I am trying to get MLE for exponential duration model using NLPNRA in proc IML. I followed the example of Rosenbrock function in SAS/IML software reference. I got the error message "ERROR: (execution) Matrix has not been set to a value." exp is the data set imported. t is the variable in the data set that are the random numbers generated from an exponential distribution.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
%macro test(dsn=,x=);&lt;BR /&gt;
proc iml;&lt;BR /&gt;
reset noname;&lt;BR /&gt;
use &amp;amp;dsn;&lt;BR /&gt;
read all var {&amp;amp;x} into tt;&lt;BR /&gt;
print tt;&lt;BR /&gt;
&lt;BR /&gt;
start LL(beta);&lt;BR /&gt;
f=sum(log(beta)-beta*tt);&lt;BR /&gt;
return(f);&lt;BR /&gt;
finish LL;&lt;BR /&gt;
&lt;BR /&gt;
start grad(beta);&lt;BR /&gt;
g=j(1,1,0);&lt;BR /&gt;
g=sum(1/beta-tt);&lt;BR /&gt;
return(g);&lt;BR /&gt;
finish grad;&lt;BR /&gt;
&lt;BR /&gt;
start hess(beta);&lt;BR /&gt;
h=j(1,1,0);&lt;BR /&gt;
h=-100/(beta*beta);&lt;BR /&gt;
return(h);&lt;BR /&gt;
finish hess;&lt;BR /&gt;
&lt;BR /&gt;
beta=1;&lt;BR /&gt;
call NLPNRA(rc,xr,"LL",beta)grd="grad" hes="hess";&lt;BR /&gt;
%mend;&lt;BR /&gt;
&lt;BR /&gt;
%test(dsn=exp,x=t);</description>
      <pubDate>Tue, 30 Mar 2010 23:15:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Problem-with-calculating-MLE-using-NLPNRA/m-p/72618#M449</guid>
      <dc:creator>wy_CA</dc:creator>
      <dc:date>2010-03-30T23:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with calculating MLE using NLPNRA</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Problem-with-calculating-MLE-using-NLPNRA/m-p/72619#M450</link>
      <description>The matrix tt is unintialized in your gradient function grad(). In order for the global variable tt to be used in grad(), you need:&lt;BR /&gt;
&lt;BR /&gt;
start grad(beta) global(tt);</description>
      <pubDate>Wed, 31 Mar 2010 12:46:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Problem-with-calculating-MLE-using-NLPNRA/m-p/72619#M450</guid>
      <dc:creator>Hutch_sas</dc:creator>
      <dc:date>2010-03-31T12:46:35Z</dc:date>
    </item>
  </channel>
</rss>

