<?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: Proc NLIN : parameter array confusion when initial values are given in dataset in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-NLIN-parameter-array-confusion-when-initial-values-are/m-p/224457#M11856</link>
    <description>Thank you Rick!</description>
    <pubDate>Tue, 08 Sep 2015 17:44:54 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2015-09-08T17:44:54Z</dc:date>
    <item>
      <title>Proc NLIN : parameter array confusion when initial values are given in dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-NLIN-parameter-array-confusion-when-initial-values-are/m-p/224447#M11854</link>
      <description>&lt;P&gt;In the simplified NLIN example below, giving initial values to model parameters in the PARAMETER statement is NOT equivalent to specifying them in a dataset. It looks like parameter names are not known at the time of array definitions when the parameters are given in a dataset. Is this an undocumented "feature"?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Parameter array given initial values in PARAMETER statement. Works fine. */&lt;BR /&gt;proc nlin data=sashelp.class;&lt;BR /&gt;parameters w=1 h=1;&lt;BR /&gt;bounds w h &amp;gt;= 0;&lt;BR /&gt;array x{*} weight height;&lt;BR /&gt;array y{*} w h;&lt;BR /&gt;s = 0;&lt;BR /&gt;do i = 1 to dim(x);&lt;BR /&gt;s = s + x{i}*y{i};&lt;BR /&gt;end;&lt;BR /&gt;model age = s;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Same problem. Parameter array given initial values in PDATA dataset. Doesn't work. */&lt;BR /&gt;data pd;&lt;BR /&gt;Parameter="w"; Estimate=1; output;&lt;BR /&gt;Parameter="h"; Estimate=1; output;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc nlin data=sashelp.class;&lt;BR /&gt;parameters / pdata=pd;&lt;BR /&gt;bounds w h &amp;gt;= 0;&lt;BR /&gt;array x{*} weight height;&lt;BR /&gt;array y{*} w h;&lt;BR /&gt;s = 0;&lt;BR /&gt;do i = 1 to dim(x);&lt;BR /&gt;s = s + x{i}*y{i};&lt;BR /&gt;end;&lt;BR /&gt;model age = s;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR: The variable y was referenced but not given a value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Sep 2015 16:55:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-NLIN-parameter-array-confusion-when-initial-values-are/m-p/224447#M11854</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2015-09-08T16:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: Proc NLIN : parameter array confusion when initial values are given in dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-NLIN-parameter-array-confusion-when-initial-values-are/m-p/224449#M11855</link>
      <description>I am pleased to report that your code runs without error in SAS/STAT 14.1 (released in July 2015 with SAS 9.4m3). Consequently, it looks like someone agreed with you that this "feature" was not ideal.&lt;BR /&gt;&lt;BR /&gt;By the way, try the new SAS color-coded editor in the new COmmunity. Click the "running man" icon when you paste in the code. It will appear color coded.</description>
      <pubDate>Tue, 08 Sep 2015 17:13:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-NLIN-parameter-array-confusion-when-initial-values-are/m-p/224449#M11855</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2015-09-08T17:13:59Z</dc:date>
    </item>
    <item>
      <title>Re: Proc NLIN : parameter array confusion when initial values are given in dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-NLIN-parameter-array-confusion-when-initial-values-are/m-p/224457#M11856</link>
      <description>Thank you Rick!</description>
      <pubDate>Tue, 08 Sep 2015 17:44:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-NLIN-parameter-array-confusion-when-initial-values-are/m-p/224457#M11856</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2015-09-08T17:44:54Z</dc:date>
    </item>
  </channel>
</rss>

