<?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: Optimize a function on a column in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Optimize-a-function-on-a-column/m-p/519280#M140634</link>
    <description>&lt;P&gt;The program is pretty much like this, and you may need to adjust the initial values (in parms statement) if the hessian matrix is singular.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc nlin data=whatever method=marquardt;&lt;BR /&gt;parms x1=1 x2=0 to by 0.1;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;bounds x1&amp;gt;=0;&lt;BR /&gt;model y=f(x1,x2);&lt;BR /&gt;output out=b predicted=yp;&lt;BR /&gt;run;&lt;/P&gt;</description>
    <pubDate>Thu, 06 Dec 2018 20:55:29 GMT</pubDate>
    <dc:creator>liyongkai800</dc:creator>
    <dc:date>2018-12-06T20:55:29Z</dc:date>
    <item>
      <title>Optimize a function on a column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Optimize-a-function-on-a-column/m-p/518481#M140325</link>
      <description>&lt;P&gt;say I have a function f(x,y)=x+y, and the data set is given by&lt;/P&gt;&lt;P&gt;var&lt;/P&gt;&lt;P&gt;3&lt;/P&gt;&lt;P&gt;6&lt;/P&gt;&lt;P&gt;5&lt;/P&gt;&lt;P&gt;7&lt;/P&gt;&lt;P&gt;Now I want to minimize the the function (x+y-3)^2+&lt;SPAN&gt;(x+y-6)^2+(x+y-5)^2+(x+y-7)^2 with the constraints&amp;nbsp; 0&amp;lt;x&amp;lt;5, 0&amp;lt;y&amp;lt;5.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I know the proc fcmp can be used to define a function like (x+y-3)^2, and optimize it under some constrains, but not sure how to use it on the whole column, any hints? Thanks.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Dec 2018 16:50:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Optimize-a-function-on-a-column/m-p/518481#M140325</guid>
      <dc:creator>liyongkai800</dc:creator>
      <dc:date>2018-12-04T16:50:49Z</dc:date>
    </item>
    <item>
      <title>Re: Optimize a function on a column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Optimize-a-function-on-a-column/m-p/518488#M140329</link>
      <description>&lt;P&gt;How does the value &lt;STRONG&gt;var&amp;nbsp;&lt;/STRONG&gt;relate to the function you want to minimize?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_nlin_syntax01.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en" target="_self"&gt;PROC NLIN&lt;/A&gt;&amp;nbsp;would be my first choice&lt;/P&gt;</description>
      <pubDate>Tue, 04 Dec 2018 17:00:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Optimize-a-function-on-a-column/m-p/518488#M140329</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2018-12-04T17:00:55Z</dc:date>
    </item>
    <item>
      <title>Re: Optimize a function on a column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Optimize-a-function-on-a-column/m-p/518521#M140342</link>
      <description>It seems PROC NLIN can estimate the parameters of the model directly, therefore I don't need to construct the function by myself. Thanks for the hint, I will give a try.</description>
      <pubDate>Tue, 04 Dec 2018 18:44:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Optimize-a-function-on-a-column/m-p/518521#M140342</guid>
      <dc:creator>liyongkai800</dc:creator>
      <dc:date>2018-12-04T18:44:42Z</dc:date>
    </item>
    <item>
      <title>Re: Optimize a function on a column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Optimize-a-function-on-a-column/m-p/518563#M140367</link>
      <description>Anytime, glad to help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Let me know how it goes and please post the final code here for other users to benefit from.</description>
      <pubDate>Tue, 04 Dec 2018 20:28:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Optimize-a-function-on-a-column/m-p/518563#M140367</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2018-12-04T20:28:08Z</dc:date>
    </item>
    <item>
      <title>Re: Optimize a function on a column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Optimize-a-function-on-a-column/m-p/519280#M140634</link>
      <description>&lt;P&gt;The program is pretty much like this, and you may need to adjust the initial values (in parms statement) if the hessian matrix is singular.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc nlin data=whatever method=marquardt;&lt;BR /&gt;parms x1=1 x2=0 to by 0.1;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;bounds x1&amp;gt;=0;&lt;BR /&gt;model y=f(x1,x2);&lt;BR /&gt;output out=b predicted=yp;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Dec 2018 20:55:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Optimize-a-function-on-a-column/m-p/519280#M140634</guid>
      <dc:creator>liyongkai800</dc:creator>
      <dc:date>2018-12-06T20:55:29Z</dc:date>
    </item>
  </channel>
</rss>

