<?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 In IML: Error message is &amp;quot;unresolved module NLPSOLVE&amp;quot; in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/In-IML-Error-message-is-quot-unresolved-module-NLPSOLVE-quot/m-p/947402#M6314</link>
    <description>&lt;P&gt;The following code appeared in a 2024 WUSS presentation (below).&lt;/P&gt;
&lt;P&gt;When running SAS OnDemand for Academics I get this IML error&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;ERROR: Invocation of unresolved module NLPSOLVE&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Can someone provide a replacement IML function?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt; &lt;STRONG&gt;IML&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;start LL(param) global(x); /* normal log likelihood */&lt;/P&gt;
&lt;P&gt;mu = param[&lt;STRONG&gt;1&lt;/STRONG&gt;]; sigma = param[&lt;STRONG&gt;2&lt;/STRONG&gt;];&lt;/P&gt;
&lt;P&gt;LL = sum( logpdf("Normal", x, mu, sigma) );&lt;/P&gt;
&lt;P&gt;return( -LL ); /* minimize -LL */&lt;/P&gt;
&lt;P&gt;finish;&lt;/P&gt;
&lt;P&gt;use Sashelp.Iris; /* read sample data */&lt;/P&gt;
&lt;P&gt;read all var {SepalWidth} into x;&lt;/P&gt;
&lt;P&gt;p = {&lt;STRONG&gt;35&lt;/STRONG&gt; &lt;STRONG&gt;5.5&lt;/STRONG&gt;}; /* guess (mu, sigma), sigma&amp;gt;0 */&lt;/P&gt;
&lt;P&gt;call nlpsolve(rc, soln, "LL", p) L={. &lt;STRONG&gt;0&lt;/STRONG&gt;}; /* sigma&amp;gt;0 */&lt;/P&gt;
&lt;P&gt;print soln;&lt;/P&gt;</description>
    <pubDate>Mon, 14 Oct 2024 17:02:48 GMT</pubDate>
    <dc:creator>blund</dc:creator>
    <dc:date>2024-10-14T17:02:48Z</dc:date>
    <item>
      <title>In IML: Error message is "unresolved module NLPSOLVE"</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/In-IML-Error-message-is-quot-unresolved-module-NLPSOLVE-quot/m-p/947402#M6314</link>
      <description>&lt;P&gt;The following code appeared in a 2024 WUSS presentation (below).&lt;/P&gt;
&lt;P&gt;When running SAS OnDemand for Academics I get this IML error&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;ERROR: Invocation of unresolved module NLPSOLVE&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Can someone provide a replacement IML function?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt; &lt;STRONG&gt;IML&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;start LL(param) global(x); /* normal log likelihood */&lt;/P&gt;
&lt;P&gt;mu = param[&lt;STRONG&gt;1&lt;/STRONG&gt;]; sigma = param[&lt;STRONG&gt;2&lt;/STRONG&gt;];&lt;/P&gt;
&lt;P&gt;LL = sum( logpdf("Normal", x, mu, sigma) );&lt;/P&gt;
&lt;P&gt;return( -LL ); /* minimize -LL */&lt;/P&gt;
&lt;P&gt;finish;&lt;/P&gt;
&lt;P&gt;use Sashelp.Iris; /* read sample data */&lt;/P&gt;
&lt;P&gt;read all var {SepalWidth} into x;&lt;/P&gt;
&lt;P&gt;p = {&lt;STRONG&gt;35&lt;/STRONG&gt; &lt;STRONG&gt;5.5&lt;/STRONG&gt;}; /* guess (mu, sigma), sigma&amp;gt;0 */&lt;/P&gt;
&lt;P&gt;call nlpsolve(rc, soln, "LL", p) L={. &lt;STRONG&gt;0&lt;/STRONG&gt;}; /* sigma&amp;gt;0 */&lt;/P&gt;
&lt;P&gt;print soln;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2024 17:02:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/In-IML-Error-message-is-quot-unresolved-module-NLPSOLVE-quot/m-p/947402#M6314</guid>
      <dc:creator>blund</dc:creator>
      <dc:date>2024-10-14T17:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: In IML: Error message is "unresolved module NLPSOLVE"</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/In-IML-Error-message-is-quot-unresolved-module-NLPSOLVE-quot/m-p/947406#M6315</link>
      <description>&lt;P&gt;Sure. ODA is running SAS 9.4, so use the NLPNRA procedure, as shown in&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2011/10/12/maximum-likelihood-estimation-in-sasiml.html" target="_blank"&gt;Maximum likelihood estimation in SAS/IML - The DO Loop&lt;/A&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC IML;
start LL(param) global(x); /* normal log likelihood */
   mu = param[1]; sigma = param[2];
   LL = sum( logpdf("Normal", x, mu, sigma) );
   return( -LL ); /* minimize -LL */
finish;

use Sashelp.Iris; /* read sample data */
read all var {SepalWidth} into x;

p = {35 5.5}; /* guess (mu, sigma), sigma&amp;gt;0 */
/*     mu-sigma constraint matrix */
con = { .   0,  /* lower bounds: -infty &amp;lt; mu; 0 &amp;lt; sigma */
        .   .}; /* upper bounds:  mu &amp;lt; infty; sigma &amp;lt; infty */
call nlpnra(rc, soln, "LL", p) BLC=con;
print soln;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;To understand where the SUM(LOGPDF(...)) function call comes from, see&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2017/06/12/log-likelihood-function-in-sas.html" target="_blank"&gt;Two simple ways to construct a log-likelihood function in SAS - The DO Loop&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2024 17:15:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/In-IML-Error-message-is-quot-unresolved-module-NLPSOLVE-quot/m-p/947406#M6315</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2024-10-14T17:15:16Z</dc:date>
    </item>
  </channel>
</rss>

