<?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: determine the relative contribution of predictors in multiple regression model in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/determine-the-relative-contribution-of-predictors-in-multiple/m-p/800173#M314735</link>
    <description>&lt;P&gt;No such calculation exists. And if you could program it, it would still be meaningless.&lt;/P&gt;</description>
    <pubDate>Fri, 04 Mar 2022 14:41:37 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2022-03-04T14:41:37Z</dc:date>
    <item>
      <title>determine the relative contribution of predictors in multiple regression model</title>
      <link>https://communities.sas.com/t5/SAS-Programming/determine-the-relative-contribution-of-predictors-in-multiple/m-p/800167#M314731</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;Let's say that I run Logistic regression and then I get the model results (Model coeficients).&lt;/P&gt;
&lt;P&gt;I would like to know how to calculate the&amp;nbsp;relative contribution of each predictor (in %)?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Train_Data;
call streaminit(614325);
do trt=1 to 3;
do rep=1 to ceil(rand('uniform')*35);
x1=rand('uniform')*10;
x2=rand('normal')*2;
x3=rand('normal')*3;
e=rand('normal');
y=2 + trt + x1 + 0*x2 + 1.4*x3 + e;
output;
end;
end;
run;


/***Build the Regression model and get model coeficneints**/
proc glmselect data=Train_Data;
class trt;
model y=trt x1 x2 x3 / selection=stepwise;
store out=OurModel;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Mar 2022 14:39:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/determine-the-relative-contribution-of-predictors-in-multiple/m-p/800167#M314731</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2022-03-04T14:39:13Z</dc:date>
    </item>
    <item>
      <title>Re: determine the relative contribution of predictors in multiple regression model</title>
      <link>https://communities.sas.com/t5/SAS-Programming/determine-the-relative-contribution-of-predictors-in-multiple/m-p/800169#M314733</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159549"&gt;@Ronein&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;Let's say that I run Logistic regression and then I get the model results (Model coeficients).&lt;/P&gt;
&lt;P&gt;I would like to know how to calculate the&amp;nbsp;relative contribution of predictor (in %)?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Train_Data;
call streaminit(614325);
do trt=1 to 3;
do rep=1 to ceil(rand('uniform')*35);
x1=rand('uniform')*10;
x2=rand('normal')*2;
x3=rand('normal')*3;
e=rand('normal');
y=2 + trt + x1 + 0*x2 + 1.4*x3 + e;
output;
end;
end;
run;


/***Build the Regression model and get model coeficneints**/
proc glmselect data=Train_Data;
class trt;
model y=trt x1 x2 x3 / selection=stepwise;
store out=OurModel;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Because of multicollinearity, there is really no such thing as a "relative contribution of predictor (in %)". It only makes sense in the case where your predictors are uncorrelated, and that only happens in designed experiments.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can standardize the coefficients and compare them to one another, to determine which has the biggest impact and which has the smallest impact, and so on.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Mar 2022 14:38:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/determine-the-relative-contribution-of-predictors-in-multiple/m-p/800169#M314733</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-03-04T14:38:26Z</dc:date>
    </item>
    <item>
      <title>Re: determine the relative contribution of predictors in multiple regression model</title>
      <link>https://communities.sas.com/t5/SAS-Programming/determine-the-relative-contribution-of-predictors-in-multiple/m-p/800171#M314734</link>
      <description>&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;In credit risk models it is common to report the&amp;nbsp;contribution of predictors (in %).&lt;/P&gt;
&lt;P&gt;May you please show how to do it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Mar 2022 14:40:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/determine-the-relative-contribution-of-predictors-in-multiple/m-p/800171#M314734</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2022-03-04T14:40:45Z</dc:date>
    </item>
    <item>
      <title>Re: determine the relative contribution of predictors in multiple regression model</title>
      <link>https://communities.sas.com/t5/SAS-Programming/determine-the-relative-contribution-of-predictors-in-multiple/m-p/800173#M314735</link>
      <description>&lt;P&gt;No such calculation exists. And if you could program it, it would still be meaningless.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Mar 2022 14:41:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/determine-the-relative-contribution-of-predictors-in-multiple/m-p/800173#M314735</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-03-04T14:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: determine the relative contribution of predictors in multiple regression model</title>
      <link>https://communities.sas.com/t5/SAS-Programming/determine-the-relative-contribution-of-predictors-in-multiple/m-p/800261#M314761</link>
      <description>&lt;P&gt;Is there a term for the statistics that you're looking for?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Shapley values are one method, but this is typically done in ML/AI.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/casactml/casactml_explainmodel_details28.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/casactml/casactml_explainmodel_details28.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://shap.readthedocs.io/en/latest/example_notebooks/overviews/An%20introduction%20to%20explainable%20AI%20with%20Shapley%20values.html#linear_regression" target="_blank"&gt;https://shap.readthedocs.io/en/latest/example_notebooks/overviews/An%20introduction%20to%20explainable%20AI%20with%20Shapley%20values.html#linear_regression&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/159549"&gt;@Ronein&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;In credit risk models it is common to report the&amp;nbsp;contribution of predictors (in %).&lt;/P&gt;
&lt;P&gt;May you please show how to do it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Mar 2022 18:09:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/determine-the-relative-contribution-of-predictors-in-multiple/m-p/800261#M314761</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-03-04T18:09:16Z</dc:date>
    </item>
    <item>
      <title>Re: determine the relative contribution of predictors in multiple regression model</title>
      <link>https://communities.sas.com/t5/SAS-Programming/determine-the-relative-contribution-of-predictors-in-multiple/m-p/800325#M314796</link>
      <description>&lt;P&gt;1) Try Partial Least Square Model .&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Train_Data;
call streaminit(614325);
do trt=1 to 3;
do rep=1 to ceil(rand('uniform')*35);
x1=rand('uniform')*10;
x2=rand('normal')*2;
x3=rand('normal')*3;
e=rand('normal');
y=2 + trt + x1 + 0*x2 + 1.4*x3 + e;
output;
end;
end;
run;


/***Build the Regression model and get model coeficneints**/
proc pls data=Train_Data  missing=em   nfac=2 plot=(ParmProfiles VIP) details;
class trt;
model y=trt x1 x2 x3 ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1646476860584.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/69171i3259CF0F3C1381E2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1646476860584.png" alt="Ksharp_0-1646476860584.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2) you can use estimated coefficient as weight to evaluate the importance of variables . the bigger of abs(beta) ,the more important the variable is.&lt;/P&gt;</description>
      <pubDate>Sat, 05 Mar 2022 10:42:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/determine-the-relative-contribution-of-predictors-in-multiple/m-p/800325#M314796</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-03-05T10:42:34Z</dc:date>
    </item>
    <item>
      <title>Re: determine the relative contribution of predictors in multiple regression model</title>
      <link>https://communities.sas.com/t5/SAS-Programming/determine-the-relative-contribution-of-predictors-in-multiple/m-p/800328#M314799</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;1) Try Partial Least Square Model .&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Train_Data;
call streaminit(614325);
do trt=1 to 3;
do rep=1 to ceil(rand('uniform')*35);
x1=rand('uniform')*10;
x2=rand('normal')*2;
x3=rand('normal')*3;
e=rand('normal');
y=2 + trt + x1 + 0*x2 + 1.4*x3 + e;
output;
end;
end;
run;


/***Build the Regression model and get model coeficneints**/
proc pls data=Train_Data  missing=em   nfac=2 plot=(ParmProfiles VIP) details;
class trt;
model y=trt x1 x2 x3 ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1646476860584.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/69171i3259CF0F3C1381E2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1646476860584.png" alt="Ksharp_0-1646476860584.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2) you can use estimated coefficient as weight to evaluate the importance of variables . the bigger of abs(beta) ,the more important the variable is.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Yes, you can certainly get measures of how important a variable is in a regression. The above method is fine. I also mentioned above that you can standardize the coefficients to get a (different) measure of importance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;None of this relates to the original request of "&lt;SPAN&gt;how to calculate the&amp;nbsp;relative contribution of each predictor (in %)" as in the context of regression using correlated x-variables, this request is meaningless. There is no such thing as relative contribution of each predictor in percent in this case.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 05 Mar 2022 12:18:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/determine-the-relative-contribution-of-predictors-in-multiple/m-p/800328#M314799</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-03-05T12:18:37Z</dc:date>
    </item>
    <item>
      <title>Re: determine the relative contribution of predictors in multiple regression model</title>
      <link>https://communities.sas.com/t5/SAS-Programming/determine-the-relative-contribution-of-predictors-in-multiple/m-p/800449#M314885</link>
      <description>&lt;P&gt;If you are talking about credit risk score-card model . it is called IV .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Generally it would pick up the variables which IV is greater than 0.1 .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the code how to calculated IV for a variable, but you need make a GROUP variable for this variable whether it is character or numeric&amp;nbsp; firstly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;%let var=marital   ;


title "变量: &amp;amp;var";
proc sql;
create table woe_&amp;amp;var as
 select &amp;amp;var as group,
sum(good_bad='bad') as n_bad label='bad的个数',sum(good_bad='good') as n_good label='good的个数',
sum(good_bad='bad')/(select sum(good_bad='bad') from have ) as bad_dist  format=percent7.2 label='bad的占比',
sum(good_bad='good')/(select sum(good_bad='good') from have ) as good_dist  format=percent7.2 label='good的占比',
log(calculated Bad_Dist/calculated Good_Dist) as &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;woe&lt;/FONT&gt;&lt;/STRONG&gt;
from have
   group by &amp;amp;var
    order by woe;


select *,sum(  (Bad_Dist-Good_Dist)*woe  ) as &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;iv&lt;/FONT&gt;&lt;/STRONG&gt;
 from woe_&amp;amp;var ;

quit;
title ' ';&lt;/PRE&gt;</description>
      <pubDate>Sun, 06 Mar 2022 09:46:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/determine-the-relative-contribution-of-predictors-in-multiple/m-p/800449#M314885</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-03-06T09:46:38Z</dc:date>
    </item>
    <item>
      <title>Re: determine the relative contribution of predictors in multiple regression model</title>
      <link>https://communities.sas.com/t5/SAS-Programming/determine-the-relative-contribution-of-predictors-in-multiple/m-p/800453#M314889</link>
      <description>&lt;P&gt;Again, I agree with you &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;, that would be another way to determine (and rank) which variables are important. But &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159549"&gt;@Ronein&lt;/a&gt; was specifically talking about "relative contribution of each predictor (in %)" in the context of stepwise regression; and no method so far ranks the predictors in % (not even sure what he means by that) but as far as I know, there is no such thing as "relative contribution of each predictor (in %)" in the context of stepwise regression.&lt;/P&gt;</description>
      <pubDate>Sun, 06 Mar 2022 10:56:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/determine-the-relative-contribution-of-predictors-in-multiple/m-p/800453#M314889</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-03-06T10:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: determine the relative contribution of predictors in multiple regression model</title>
      <link>https://communities.sas.com/t5/SAS-Programming/determine-the-relative-contribution-of-predictors-in-multiple/m-p/800629#M315007</link>
      <description>"(not even sure what he means by that)"&lt;BR /&gt;Yeah. Agree with that. &lt;BR /&gt;In the credit risk field , the most used model is Score Card ( a.k.a  proc logistic ) . Therefore I assume OP is talking about IV , WOE .....</description>
      <pubDate>Mon, 07 Mar 2022 12:11:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/determine-the-relative-contribution-of-predictors-in-multiple/m-p/800629#M315007</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-03-07T12:11:09Z</dc:date>
    </item>
    <item>
      <title>Re: determine the relative contribution of predictors in multiple regression model</title>
      <link>https://communities.sas.com/t5/SAS-Programming/determine-the-relative-contribution-of-predictors-in-multiple/m-p/944037#M369948</link>
      <description>&lt;P&gt;my thoughts -&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. decide what is your target index (how good is your model) - i tend to use the gini (or sommer'sD)&lt;/P&gt;&lt;P&gt;2. re estimate the model n times (n is the number of variables in the model), every time eliminate one var, the diference in Gini between the original model and the new one (var i eliminated) is the contrebution of var i&lt;/P&gt;&lt;P&gt;3. to make the resaults more "nice" you can calibrate them so that the sum will be 1 (100%)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;its not exactly 'relative contribution' but i think its as close as possiable &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2024 06:52:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/determine-the-relative-contribution-of-predictors-in-multiple/m-p/944037#M369948</guid>
      <dc:creator>Haim</dc:creator>
      <dc:date>2024-09-16T06:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: determine the relative contribution of predictors in multiple regression model</title>
      <link>https://communities.sas.com/t5/SAS-Programming/determine-the-relative-contribution-of-predictors-in-multiple/m-p/944048#M369950</link>
      <description>For the sake of conventient , you also could try PROC GLMSELECT or PROC HPGENSELECT .</description>
      <pubDate>Mon, 16 Sep 2024 07:21:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/determine-the-relative-contribution-of-predictors-in-multiple/m-p/944048#M369950</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-09-16T07:21:39Z</dc:date>
    </item>
  </channel>
</rss>

