<?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: Regression add var and other var become mot significant in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Regression-add-var-and-other-var-become-mot-significant/m-p/952824#M372362</link>
    <description>"but when I add another variable x2 then x1 become not significant and very weak. "&lt;BR /&gt;That is a very normal phenomenon in Statisctcial Model.&lt;BR /&gt;There are four type of Square Sum to split the variance from variables. Type ISS IISS IIISS IVSS.&lt;BR /&gt;Once a new variable X2 enter the model ,the SS would be split once again. X2 assign more SS ,X1 assign less SS,therefore you would see X2 is significant, X1 is not.&lt;BR /&gt;&lt;BR /&gt;" don't see high correlation between x1 and x2( correlation 0.2)."&lt;BR /&gt;Also could use the following option(CORRB) to check their multiple-colinear.&lt;BR /&gt;proc logistic .....;&lt;BR /&gt;class x1 x2;&lt;BR /&gt;model y=x1 x2/CORRB;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;And I think &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt; &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13633"&gt;@StatDave&lt;/a&gt;_SAS have more words to say.</description>
    <pubDate>Sat, 07 Dec 2024 06:45:59 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2024-12-07T06:45:59Z</dc:date>
    <item>
      <title>Regression add var and other var become mot significant</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Regression-add-var-and-other-var-become-mot-significant/m-p/952776#M372346</link>
      <description>Hello&lt;BR /&gt;I run logistic regression (binary outcome) with categorical predictors ( credit risk model).&lt;BR /&gt;There is a predictor varaible x1 that is significant but when I add another variable x2 then x1 become not significant and very weak. I run Kramer matrix and don't see high correlation between x1 and x2( correlation 0.2).&lt;BR /&gt;What action ate needed ( show code please) to investigate the reason why it happened?&lt;BR /&gt;I read that can using Stata's margins command to explore how your key explanatory variable's association with the outcome differs at various levels of other predictors. Can show code please?</description>
      <pubDate>Fri, 06 Dec 2024 19:58:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Regression-add-var-and-other-var-become-mot-significant/m-p/952776#M372346</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2024-12-06T19:58:54Z</dc:date>
    </item>
    <item>
      <title>Re: Regression add var and other var become mot significant</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Regression-add-var-and-other-var-become-mot-significant/m-p/952777#M372347</link>
      <description>&lt;P&gt;Absolute minimum for discussion would be both sets of code submitted. Better would be to include the output you are discussing so we can see values and summaries to see if they provide any helpful hints.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why? Different model, different fit. The math does that.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What it means? Depends a lot on the actual content of the data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Suppose I have a model (different sort of regression) that has a dependent variable of Maximum Air Temperature and use Month of the year as the predictor. I might get some indications of a "good" fit because winter has lower temps than summer on some given range of dates. Then I add another predictor, such as the previous day's temperature to the model. It is very likely that the "Month" is less useful as a predictor because of the nature of how air temperature works.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Statistically significant does always imply practicality of use or reliability.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2024 20:14:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Regression-add-var-and-other-var-become-mot-significant/m-p/952777#M372347</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-12-06T20:14:13Z</dc:date>
    </item>
    <item>
      <title>Re: Regression add var and other var become mot significant</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Regression-add-var-and-other-var-become-mot-significant/m-p/952822#M372360</link>
      <description>Thanks.&lt;BR /&gt;I would like to see a code that&lt;BR /&gt;explore how explanatory variable x2 association with the outcome differs at various levels of x1</description>
      <pubDate>Sat, 07 Dec 2024 04:35:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Regression-add-var-and-other-var-become-mot-significant/m-p/952822#M372360</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2024-12-07T04:35:14Z</dc:date>
    </item>
    <item>
      <title>Re: Regression add var and other var become mot significant</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Regression-add-var-and-other-var-become-mot-significant/m-p/952824#M372362</link>
      <description>"but when I add another variable x2 then x1 become not significant and very weak. "&lt;BR /&gt;That is a very normal phenomenon in Statisctcial Model.&lt;BR /&gt;There are four type of Square Sum to split the variance from variables. Type ISS IISS IIISS IVSS.&lt;BR /&gt;Once a new variable X2 enter the model ,the SS would be split once again. X2 assign more SS ,X1 assign less SS,therefore you would see X2 is significant, X1 is not.&lt;BR /&gt;&lt;BR /&gt;" don't see high correlation between x1 and x2( correlation 0.2)."&lt;BR /&gt;Also could use the following option(CORRB) to check their multiple-colinear.&lt;BR /&gt;proc logistic .....;&lt;BR /&gt;class x1 x2;&lt;BR /&gt;model y=x1 x2/CORRB;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;And I think &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt; &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13633"&gt;@StatDave&lt;/a&gt;_SAS have more words to say.</description>
      <pubDate>Sat, 07 Dec 2024 06:45:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Regression-add-var-and-other-var-become-mot-significant/m-p/952824#M372362</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-12-07T06:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: Regression add var and other var become mot significant</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Regression-add-var-and-other-var-become-mot-significant/m-p/952883#M372385</link>
      <description>Thanks&lt;BR /&gt;Is this corrb options not same as Kramer matrix?&lt;BR /&gt;In Kramer matrix the correlation between x1 and x2 is low (0.2) so from here I couldn't identify multicollinrarity. &lt;BR /&gt;&lt;BR /&gt;Here is example to corrb option that you showed .&lt;BR /&gt;proc logistic data=sashelp.heart;&lt;BR /&gt;class sex bp_status;&lt;BR /&gt;model status=sex bp_status height weight ageatstart/corrb ;&lt;BR /&gt;run;</description>
      <pubDate>Sun, 08 Dec 2024 10:44:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Regression-add-var-and-other-var-become-mot-significant/m-p/952883#M372385</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2024-12-08T10:44:49Z</dc:date>
    </item>
    <item>
      <title>Re: Regression add var and other var become mot significant</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Regression-add-var-and-other-var-become-mot-significant/m-p/952909#M372389</link>
      <description>&lt;P&gt;Sorry. I am not familiar with&amp;nbsp;&lt;SPAN&gt;Kramer matrix&amp;nbsp;.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;But CORR option could take into account of the correlation between all the independent variable, so I suggest to use it . According to the code you posted ,you get this:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1733708520952.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/102805i4D3F126A43856990/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1733708520952.png" alt="Ksharp_0-1733708520952.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Height and Intercept term are&amp;nbsp;&lt;SPAN&gt;multicollinrarity.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;There are too many method to performance the selection of variables.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The following are the two ways I am favorited .&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1)LASSO method:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc hpgenselect data=sashelp.heart;
class sex bp_status;
model status=sex bp_status height weight ageatstart/dist=binary ;
selection method=Lasso(choose=SBC) details=all;
performance details;
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_1-1733709156082.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/102806i48AA7A7175D5629D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_1-1733709156082.png" alt="Ksharp_1-1733709156082.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2) PROC PLS (&lt;STRONG&gt;which could take care of MISSGING value&lt;/STRONG&gt; ,while PROC HPGENSELECT would delete it)&lt;/P&gt;
&lt;P&gt;P.S. This is specially suited for Credit Risk/Score Card data,since the big wide table have lots of missing values.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;

data heart;
 set sashelp.heart;
 y=ifn(status='Dead',1,0);
run;

ods output  VariableImportancePlot= VariableImportancePlot;
proc pls data=heart  missing=em   nfac=2 plot=(ParmProfiles VIP) details; 
class sex bp_status;
 model y=sex bp_status height weight ageatstart;
run;
proc sort data=VariableImportancePlot;
 by descending VIP;
run;
proc print;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_2-1733709620406.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/102807i032834101E5D802B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_2-1733709620406.png" alt="Ksharp_2-1733709620406.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;the VIP is bigger,the variable is more important.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2024 02:01:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Regression-add-var-and-other-var-become-mot-significant/m-p/952909#M372389</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-12-09T02:01:46Z</dc:date>
    </item>
    <item>
      <title>Re: Regression add var and other var become mot significant</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Regression-add-var-and-other-var-become-mot-significant/m-p/952910#M372390</link>
      <description>"explore how explanatory variable x2 association with the outcome differs at various levels of x1"&lt;BR /&gt;You could check ESTIMATE or LSMEANS  or LSESTIMATE statement to compare the difference between X levels.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://support.sas.com/kb/24/447.html" target="_blank"&gt;https://support.sas.com/kb/24/447.html&lt;/A&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 09 Dec 2024 02:07:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Regression-add-var-and-other-var-become-mot-significant/m-p/952910#M372390</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-12-09T02:07:31Z</dc:date>
    </item>
    <item>
      <title>Re: Regression add var and other var become mot significant</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Regression-add-var-and-other-var-become-mot-significant/m-p/952968#M372409</link>
      <description>&lt;P&gt;For what very little it may be worth, in my previous job we has some models that our process before reporting results to the clients checked the result with the &lt;STRONG&gt;same&lt;/STRONG&gt; model variables in &lt;STRONG&gt;different order&lt;/STRONG&gt; on the equivalent of the Model statement. Exact same variables, different "significance" results. Which basically was telling us the choice of variables wasn't robust if variables when from significant to not significant...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2024 15:36:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Regression-add-var-and-other-var-become-mot-significant/m-p/952968#M372409</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-12-09T15:36:28Z</dc:date>
    </item>
  </channel>
</rss>

