<?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 regression with separate coefficients for postitive and negative values in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/regression-with-separate-coefficients-for-postitive-and-negative/m-p/138754#M261384</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to run regression a on b. However, I want to have separate coefficients for b+ (positive b) and b- (negative b). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Model is&amp;nbsp; a = alpha + beta1*abs(b+) + beta2*abs(b-) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much, &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Jul 2014 09:18:28 GMT</pubDate>
    <dc:creator>vxhong17</dc:creator>
    <dc:date>2014-07-28T09:18:28Z</dc:date>
    <item>
      <title>regression with separate coefficients for postitive and negative values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/regression-with-separate-coefficients-for-postitive-and-negative/m-p/138754#M261384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to run regression a on b. However, I want to have separate coefficients for b+ (positive b) and b- (negative b). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Model is&amp;nbsp; a = alpha + beta1*abs(b+) + beta2*abs(b-) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much, &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jul 2014 09:18:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/regression-with-separate-coefficients-for-postitive-and-negative/m-p/138754#M261384</guid>
      <dc:creator>vxhong17</dc:creator>
      <dc:date>2014-07-28T09:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: regression with separate coefficients for postitive and negative values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/regression-with-separate-coefficients-for-postitive-and-negative/m-p/138755#M261385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data test;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;set myData;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;absB = abs(b);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;signB = b &amp;gt;= 0; /* Consider zero positive */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc glm data=test;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;class signB;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/* Same intercept */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;model a = absB*signB / solution;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jul 2014 14:37:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/regression-with-separate-coefficients-for-postitive-and-negative/m-p/138755#M261385</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2014-07-28T14:37:28Z</dc:date>
    </item>
    <item>
      <title>Re: regression with separate coefficients for postitive and negative values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/regression-with-separate-coefficients-for-postitive-and-negative/m-p/138756#M261386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;STRONG style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;A _jive_internal="true" class="jiveTT-hover-user jive-username-link" data-avatarid="1153" data-externalid="" data-presence="null" data-userid="2746" data-username="PGStats" href="https://communities.sas.com/people/PGStats" id="jive-274621952166628642186" style="padding: 0 3px 0 0; font-weight: inherit; font-style: inherit; font-size: 1.1em; font-family: inherit; color: #0e66ba;"&gt;PGStats&lt;/A&gt;&lt;/STRONG&gt;, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the case that I want to run this regression for each company (company_ID), how cai I modify the code? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much, &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jul 2014 18:32:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/regression-with-separate-coefficients-for-postitive-and-negative/m-p/138756#M261386</guid>
      <dc:creator>vxhong17</dc:creator>
      <dc:date>2014-07-28T18:32:18Z</dc:date>
    </item>
    <item>
      <title>Re: regression with separate coefficients for postitive and negative values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/regression-with-separate-coefficients-for-postitive-and-negative/m-p/138757#M261387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use BY processing:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;data test;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;set myData;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;absB = abs(b);&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;signB = b &amp;gt;= 0; /* Consider zero positive */&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;proc sort data=test; by company_ID; run;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;proc glm data=test;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;by company_ID;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;class signB;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;/* Same intercept */&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;model a = absB*signB / solution;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;PG&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jul 2014 18:40:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/regression-with-separate-coefficients-for-postitive-and-negative/m-p/138757#M261387</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2014-07-28T18:40:41Z</dc:date>
    </item>
    <item>
      <title>Re: regression with separate coefficients for postitive and negative values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/regression-with-separate-coefficients-for-postitive-and-negative/m-p/138758#M261388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi PGstats, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much for your help, &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jul 2014 18:49:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/regression-with-separate-coefficients-for-postitive-and-negative/m-p/138758#M261388</guid>
      <dc:creator>vxhong17</dc:creator>
      <dc:date>2014-07-28T18:49:05Z</dc:date>
    </item>
  </channel>
</rss>

