<?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 Restrict statement in PROC REG in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Restrict-statement-in-PROC-REG/m-p/291942#M15546</link>
    <description>&lt;P&gt;I have a data set that predicts the cost of a hospital stay. A patient may be seen by up to three doctors. Here are the variables:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;cost hospital age diagnosis doctor1 doctor2 doctor3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once I test the betas for doctor1-doctor3 and find no sig. diff., I want to force their betas to be the same. Here's my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc reg data = hospcost;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;model cost = hospital age diagnosis doctor 1 doctor2 doctor3;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;restrict doctor1=doctor2=doctor3;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;output out = results1 p = pred r = resid;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The model runs, but at the bottom of the table of parameter estimates I see two variables called restrict. My adj-R2 is the same as when I didn't use the restrict statement. That shouldn't happen. Further, when I run a proc univariate on resid they are distributed in almost a perfect normal curve. Can anyone explain what is occurring?&lt;/P&gt;</description>
    <pubDate>Wed, 17 Aug 2016 13:13:33 GMT</pubDate>
    <dc:creator>DocMartin</dc:creator>
    <dc:date>2016-08-17T13:13:33Z</dc:date>
    <item>
      <title>Restrict statement in PROC REG</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Restrict-statement-in-PROC-REG/m-p/291942#M15546</link>
      <description>&lt;P&gt;I have a data set that predicts the cost of a hospital stay. A patient may be seen by up to three doctors. Here are the variables:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;cost hospital age diagnosis doctor1 doctor2 doctor3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once I test the betas for doctor1-doctor3 and find no sig. diff., I want to force their betas to be the same. Here's my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc reg data = hospcost;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;model cost = hospital age diagnosis doctor 1 doctor2 doctor3;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;restrict doctor1=doctor2=doctor3;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;output out = results1 p = pred r = resid;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The model runs, but at the bottom of the table of parameter estimates I see two variables called restrict. My adj-R2 is the same as when I didn't use the restrict statement. That shouldn't happen. Further, when I run a proc univariate on resid they are distributed in almost a perfect normal curve. Can anyone explain what is occurring?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2016 13:13:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Restrict-statement-in-PROC-REG/m-p/291942#M15546</guid>
      <dc:creator>DocMartin</dc:creator>
      <dc:date>2016-08-17T13:13:33Z</dc:date>
    </item>
    <item>
      <title>Re: Restrict statement in PROC REG</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Restrict-statement-in-PROC-REG/m-p/292182#M15557</link>
      <description>&lt;P&gt;Sorry to be answering my own question, but after doing some reading I think I know what's happening. In the RESTRICT staement a Lagrangian parameter is being added for each restriction. These parameters&amp;nbsp;have associated standard errors, and their p-values indicate if the restrictions are not valid (low p-values).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;An alternative way to specify the model would be to have a single beta for the new variable (doctor1 + doctor2 + doctor3). The results obtained from this model and the one above should be the same.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this is not correct please let me know.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2016 14:03:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Restrict-statement-in-PROC-REG/m-p/292182#M15557</guid>
      <dc:creator>DocMartin</dc:creator>
      <dc:date>2016-08-17T14:03:12Z</dc:date>
    </item>
    <item>
      <title>Re: Restrict statement in PROC REG</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Restrict-statement-in-PROC-REG/m-p/825002#M40859</link>
      <description>&lt;P&gt;Came across this post and just wanted to add that t&lt;SPAN&gt;he restrict statement is only testing if the lagrange multiplier is significantly different from zero. People typically ignore the estimate and p-value as they do not have much practical meaning.&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV id="trackPages"&gt;
&lt;DIV id="Page-2595501225687614119" class="page"&gt;
&lt;DIV id="DivData-2595501225687614119" class="pageData"&gt;
&lt;P class="cs2654AE3A"&gt;&lt;SPAN class="cs2F01FF37"&gt;To understand this multiplier you can check the following link &lt;/SPAN&gt;&lt;SPAN class="csF53863FF"&gt;&lt;A class="cs7E736E" href="https://en.wikipedia.org/wiki/Lagrange_multiplier" target="new"&gt;&lt;SPAN class="csB7CE8BEA"&gt;Lagrange multiplier - Wikipedia&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN class="csF53863FF"&gt; .&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs2654AE3A"&gt;&lt;SPAN class="csF53863FF"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs2654AE3A"&gt;&lt;SPAN class="csF53863FF"&gt;The bellow SAS blog is also a great reference.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs2654AE3A"&gt;&lt;SPAN class="csF53863FF"&gt;&lt;A class="cs7E736E" href="https://blogs.sas.com/content/iml/2020/09/16/restricted-regression-sas.html" target="new"&gt;&lt;SPAN class="csB7CE8BEA"&gt;Restricted least squares regression in SAS - The DO Loop&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 22 Jul 2022 19:06:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Restrict-statement-in-PROC-REG/m-p/825002#M40859</guid>
      <dc:creator>JoséQ</dc:creator>
      <dc:date>2022-07-22T19:06:33Z</dc:date>
    </item>
  </channel>
</rss>

