<?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: how to make restriction work in PROC NLIN in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-make-restriction-work-in-PROC-NLIN/m-p/701461#M214815</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/163151"&gt;@JacAder&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/163151"&gt;@JacAder&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Also, in the output dataset aa, _TYPE_ = "FINAL" are the estimated parameters, am I right?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Yes, the observation with _TYPE_="FINAL" would contain the&amp;nbsp;&lt;SPAN style="font-family: inherit;"&gt;final parameter estimates.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;If parameter &lt;FONT face="courier new,courier"&gt;a&lt;/FONT&gt; is known to be zero, I would just simplify the model equation to &lt;FONT face="courier new,courier"&gt;y = b*x&lt;/FONT&gt; and not mention&amp;nbsp;&lt;FONT face="courier new,courier"&gt;a&lt;/FONT&gt;&amp;nbsp;anywhere in the step. Since&amp;nbsp;&lt;FONT face="courier new,courier"&gt;y = b*x&lt;/FONT&gt; is a linear model (without an intercept), I would start with PROC REG or PROC GLM and use the NOINT option of the MODEL statement. If the estimated slope &lt;FONT face="courier new,courier"&gt;b&lt;/FONT&gt; is positive, the restriction is met. Otherwise, given that there are reasons to expect a positive slope, I would suspect one or more outliers to distort the estimation. I don't think that PROC NLIN with its BOUNDS statement would really help in this situation: The outliers would mislead PROC NLIN's algorithms as well and I would expect a poor model fit with an estimate of &lt;FONT face="courier new,courier"&gt;b&lt;/FONT&gt; close to zero. I'd rather investigate the suspected outliers (scatter plot, ...) and consider robust regression (PROC ROBUSTREG) to deal with them.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 29 Nov 2020 09:33:56 GMT</pubDate>
    <dc:creator>FreelanceReinh</dc:creator>
    <dc:date>2020-11-29T09:33:56Z</dc:date>
    <item>
      <title>how to make restriction work in PROC NLIN</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-make-restriction-work-in-PROC-NLIN/m-p/701450#M214812</link>
      <description>&lt;P&gt;I am running the regression y = a + b*x, by ID, with the restriction of a=0 and b&amp;gt;0.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the PROC NLIN, the&amp;nbsp;bounds statement requires inequality, so my code does not work.&lt;/P&gt;
&lt;P&gt;1) if I simply set model = b*x (and delete a=0 in parameters and bounds statements), does that yield the result of a=0? seems like the result is desired, but I am not sure.&lt;/P&gt;
&lt;P&gt;2) in the output dataset aa, _TYPE_ = "FINAL" are the estimated parameters, am I right?&lt;/P&gt;
&lt;P&gt;Thank you and have a great holiday!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc nlin data=sample outest=aa noprint;
   parameters a=0 b=1;         
   bounds  &lt;FONT color="#FF0000"&gt;a=0,&lt;/FONT&gt; b&amp;gt;0;
   model y = a + b*x;
   by id;
   output out=bb  r=resid  parms=a b;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 09:08:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-make-restriction-work-in-PROC-NLIN/m-p/701450#M214812</guid>
      <dc:creator>JacAder</dc:creator>
      <dc:date>2020-11-25T09:08:41Z</dc:date>
    </item>
    <item>
      <title>Re: how to make restriction work in PROC NLIN</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-make-restriction-work-in-PROC-NLIN/m-p/701461#M214815</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/163151"&gt;@JacAder&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/163151"&gt;@JacAder&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Also, in the output dataset aa, _TYPE_ = "FINAL" are the estimated parameters, am I right?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Yes, the observation with _TYPE_="FINAL" would contain the&amp;nbsp;&lt;SPAN style="font-family: inherit;"&gt;final parameter estimates.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;If parameter &lt;FONT face="courier new,courier"&gt;a&lt;/FONT&gt; is known to be zero, I would just simplify the model equation to &lt;FONT face="courier new,courier"&gt;y = b*x&lt;/FONT&gt; and not mention&amp;nbsp;&lt;FONT face="courier new,courier"&gt;a&lt;/FONT&gt;&amp;nbsp;anywhere in the step. Since&amp;nbsp;&lt;FONT face="courier new,courier"&gt;y = b*x&lt;/FONT&gt; is a linear model (without an intercept), I would start with PROC REG or PROC GLM and use the NOINT option of the MODEL statement. If the estimated slope &lt;FONT face="courier new,courier"&gt;b&lt;/FONT&gt; is positive, the restriction is met. Otherwise, given that there are reasons to expect a positive slope, I would suspect one or more outliers to distort the estimation. I don't think that PROC NLIN with its BOUNDS statement would really help in this situation: The outliers would mislead PROC NLIN's algorithms as well and I would expect a poor model fit with an estimate of &lt;FONT face="courier new,courier"&gt;b&lt;/FONT&gt; close to zero. I'd rather investigate the suspected outliers (scatter plot, ...) and consider robust regression (PROC ROBUSTREG) to deal with them.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 29 Nov 2020 09:33:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-make-restriction-work-in-PROC-NLIN/m-p/701461#M214815</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2020-11-29T09:33:56Z</dc:date>
    </item>
    <item>
      <title>Re: how to make restriction work in PROC NLIN</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-make-restriction-work-in-PROC-NLIN/m-p/702230#M215083</link>
      <description>Really appreciate your help!</description>
      <pubDate>Sun, 29 Nov 2020 01:51:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-make-restriction-work-in-PROC-NLIN/m-p/702230#M215083</guid>
      <dc:creator>JacAder</dc:creator>
      <dc:date>2020-11-29T01:51:15Z</dc:date>
    </item>
  </channel>
</rss>

