<?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: Looking for simple codes to put mutiple coefficients in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Looking-for-simple-codes-to-put-mutiple-coefficients/m-p/575057#M162589</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/270067"&gt;@JKCho&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc surveyreg data=crdsimple;
class sic fyear idvc ids loss;
model rating = sic fyear logat roa lev idvc ids loss/ solution;
run;
data crd2;
set crdsimple;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;rtmade = 16.8313718 -0.9310491*logat-1.0102761*roa+0.7764174*lev-2.4251711*idvc-0.4183952*ids+1.5549358*loss ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data crd3;
set crd2;
if sic = 0100 then rtmade1 = rtmade+2.9293598;
if fyear = 1993 then rtmade2 = rtmade1-3.5688886;
if sic = 1000 then rtmade1 = rtmade+2.4553097;
if fyear = 2008 then rtmade2 = rtmade1--1.0594573;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hi!!!!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Throughout the above codes, I could obtain coefficient to estimate by dependent variable!&lt;/P&gt;
&lt;P&gt;However, the problem is... that I have so many categorical variables and need to input so many coefficients of SICs and FYEARs.&lt;/P&gt;
&lt;P&gt;As you can see the last code, I did a little but I have more than 500 categories...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does anyone know better ways to code to reflect categorical coefficients?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I appreciate your helpful comments so much!!!!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So, where are those coefficients coming from? If you mean that you need to use something from the output of the Surveyreg procedure then you should direct the needed output into a data set from the proc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;maybe&lt;/P&gt;
&lt;PRE&gt;proc surveyreg data=crdsimple;
class sic fyear idvc ids loss;
model rating = sic fyear logat roa lev idvc ids loss/ solution;
ods output Parameterestimates =work.parms;
run;
&lt;/PRE&gt;
&lt;P&gt;And work.parms would have the coefficients needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You would likely need to transpose modify the output set to use in the fashion you are attempting.&lt;/P&gt;</description>
    <pubDate>Fri, 19 Jul 2019 20:50:09 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2019-07-19T20:50:09Z</dc:date>
    <item>
      <title>Looking for simple codes to put mutiple coefficients</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Looking-for-simple-codes-to-put-mutiple-coefficients/m-p/575045#M162583</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc surveyreg data=crdsimple;
class sic fyear idvc ids loss;
model rating = sic fyear logat roa lev idvc ids loss/ solution;
run;
data crd2;
set crdsimple;&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;rtmade = 16.8313718 -0.9310491*logat-1.0102761*roa+0.7764174*lev-2.4251711*idvc-0.4183952*ids+1.5549358*loss ;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data crd3;
set crd2;
if sic = 0100 then rtmade1 = rtmade+2.9293598;
if fyear = 1993 then rtmade2 = rtmade1-3.5688886;
if sic = 1000 then rtmade1 = rtmade+2.4553097;
if fyear = 2008 then rtmade2 = rtmade1--1.0594573;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Hi!!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Throughout the above codes, I could obtain coefficient to estimate by dependent variable!&lt;/P&gt;&lt;P&gt;However, the problem is... that I have so many categorical variables and need to input so many coefficients of SICs and FYEARs.&lt;/P&gt;&lt;P&gt;As you can see the last code, I did a little but I have more than 500 categories...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know better ways to code to reflect categorical coefficients?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate your helpful comments so much!!!!&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2019 19:59:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Looking-for-simple-codes-to-put-mutiple-coefficients/m-p/575045#M162583</guid>
      <dc:creator>JKCho</dc:creator>
      <dc:date>2019-07-19T19:59:53Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for simple codes to put mutiple coefficients</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Looking-for-simple-codes-to-put-mutiple-coefficients/m-p/575057#M162589</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/270067"&gt;@JKCho&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc surveyreg data=crdsimple;
class sic fyear idvc ids loss;
model rating = sic fyear logat roa lev idvc ids loss/ solution;
run;
data crd2;
set crdsimple;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;rtmade = 16.8313718 -0.9310491*logat-1.0102761*roa+0.7764174*lev-2.4251711*idvc-0.4183952*ids+1.5549358*loss ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data crd3;
set crd2;
if sic = 0100 then rtmade1 = rtmade+2.9293598;
if fyear = 1993 then rtmade2 = rtmade1-3.5688886;
if sic = 1000 then rtmade1 = rtmade+2.4553097;
if fyear = 2008 then rtmade2 = rtmade1--1.0594573;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hi!!!!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Throughout the above codes, I could obtain coefficient to estimate by dependent variable!&lt;/P&gt;
&lt;P&gt;However, the problem is... that I have so many categorical variables and need to input so many coefficients of SICs and FYEARs.&lt;/P&gt;
&lt;P&gt;As you can see the last code, I did a little but I have more than 500 categories...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does anyone know better ways to code to reflect categorical coefficients?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I appreciate your helpful comments so much!!!!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So, where are those coefficients coming from? If you mean that you need to use something from the output of the Surveyreg procedure then you should direct the needed output into a data set from the proc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;maybe&lt;/P&gt;
&lt;PRE&gt;proc surveyreg data=crdsimple;
class sic fyear idvc ids loss;
model rating = sic fyear logat roa lev idvc ids loss/ solution;
ods output Parameterestimates =work.parms;
run;
&lt;/PRE&gt;
&lt;P&gt;And work.parms would have the coefficients needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You would likely need to transpose modify the output set to use in the fashion you are attempting.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2019 20:50:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Looking-for-simple-codes-to-put-mutiple-coefficients/m-p/575057#M162589</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-07-19T20:50:09Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for simple codes to put mutiple coefficients</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Looking-for-simple-codes-to-put-mutiple-coefficients/m-p/575083#M162598</link>
      <description>If you're looking to take a model and apply those results to new data, the term is often called Scoring a new data set and there's PROC SCORE, PROC PLM or SCORE statements within procs that automate this process so you don't need to code it yourself.</description>
      <pubDate>Sat, 20 Jul 2019 00:13:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Looking-for-simple-codes-to-put-mutiple-coefficients/m-p/575083#M162598</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-07-20T00:13:26Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for simple codes to put mutiple coefficients</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Looking-for-simple-codes-to-put-mutiple-coefficients/m-p/575097#M162609</link>
      <description>A quick solution was simple out p=pred... but I learned stm new from you too! Thx!!!</description>
      <pubDate>Sat, 20 Jul 2019 05:46:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Looking-for-simple-codes-to-put-mutiple-coefficients/m-p/575097#M162609</guid>
      <dc:creator>JKCho</dc:creator>
      <dc:date>2019-07-20T05:46:40Z</dc:date>
    </item>
  </channel>
</rss>

