<?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: Running an MLR model with an interaction term in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/Running-an-MLR-model-with-an-interaction-term/m-p/545430#M7276</link>
    <description>&lt;P&gt;From the little you have given us, it appears that in the first model you are estimating a single slope (-1.54) for both CCCF1 groups. In the second model, you are estimating separate slopes (-1.49, -1.60) for each group.&lt;/P&gt;</description>
    <pubDate>Sat, 23 Mar 2019 04:45:41 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2019-03-23T04:45:41Z</dc:date>
    <item>
      <title>Running an MLR model with an interaction term</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Running-an-MLR-model-with-an-interaction-term/m-p/545335#M7270</link>
      <description>&lt;P&gt;Hi Everyone,&lt;BR /&gt;&lt;BR /&gt;First time poster here. I am using SAS Studio and have run into a puzzling finding when attempting to run a multiple linear regression (MLR) model with and without an interaction term included. In Image 1, NSIDSC is contributing to the model when consulting the parameter estimates table and in Image 2 (the analysis with the interaction term), it appears to not be contributing.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Question is, what does this mean? Why does this happen? And, how would I interpret this?&lt;BR /&gt;&lt;BR /&gt;Any help on the matter would be greatly appreciated. Thank you!&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Image 1" style="width: 322px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/28129i6B3DA43AAAE4DA60/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2019-03-22 at 1.44.13 PM.png" alt="Image 1" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Image 1&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Image 2" style="width: 324px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/28128iC987F5EEDFEDCF71/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2019-03-22 at 1.44.26 PM.png" alt="Image 2" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Image 2&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2019 17:58:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Running-an-MLR-model-with-an-interaction-term/m-p/545335#M7270</guid>
      <dc:creator>ValSki</dc:creator>
      <dc:date>2019-03-22T17:58:37Z</dc:date>
    </item>
    <item>
      <title>Re: Running an MLR model with an interaction term</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Running-an-MLR-model-with-an-interaction-term/m-p/545430#M7276</link>
      <description>&lt;P&gt;From the little you have given us, it appears that in the first model you are estimating a single slope (-1.54) for both CCCF1 groups. In the second model, you are estimating separate slopes (-1.49, -1.60) for each group.&lt;/P&gt;</description>
      <pubDate>Sat, 23 Mar 2019 04:45:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Running-an-MLR-model-with-an-interaction-term/m-p/545430#M7276</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-03-23T04:45:41Z</dc:date>
    </item>
    <item>
      <title>Re: Running an MLR model with an interaction term</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Running-an-MLR-model-with-an-interaction-term/m-p/545465#M7281</link>
      <description>&lt;P&gt;We'd probably need to see the full output, and the code in order to give you a complete answer. As to "why is this happening", different models will produce different results, its as simple as that.&lt;/P&gt;</description>
      <pubDate>Sat, 23 Mar 2019 11:19:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Running-an-MLR-model-with-an-interaction-term/m-p/545465#M7281</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-03-23T11:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: Running an MLR model with an interaction term</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Running-an-MLR-model-with-an-interaction-term/m-p/545478#M7282</link>
      <description>&lt;P&gt;Hello Paige,&lt;BR /&gt;&lt;BR /&gt;Thank you for replying. Here are the codes for the two analyses I was running. I've also attached the full output for the two.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Without interaction term (image 1) and with (image 2):&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc glmselect data=WORK.IMPORT outdesign(addinputvars)=Work.reg_design;&lt;BR /&gt;class DHH_SEX CCCF1 SPT_01 INCGHH / param=glm;&lt;BR /&gt;model PMHDSCR=NSIDSC DHH_SEX CCCF1 SPT_01 INCGHH / showpvalues selection=none;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc reg data=Work.reg_design alpha=0.05 plots(only)=(diagnostics residuals&lt;BR /&gt;observedbypredicted);&lt;BR /&gt;where DHH_SEX is not missing and CCCF1 is not missing and SPT_01 is not&lt;BR /&gt;missing and INCGHH is not missing;&lt;BR /&gt;ods select DiagnosticsPanel ResidualPlot ObservedByPredicted;&lt;BR /&gt;model PMHDSCR=&amp;amp;_GLSMOD /;&lt;BR /&gt;run;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc glmselect data=WORK.IMPORT outdesign(addinputvars)=Work.reg_design;&lt;BR /&gt;class CCCF1 DHH_SEX SPT_01 INCGHH / param=glm;&lt;BR /&gt;model PMHDSCR=NSIDSC*CCCF1 NSIDSC CCCF1 DHH_SEX SPT_01 INCGHH / showpvalues&lt;BR /&gt;selection=none;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc reg data=Work.reg_design alpha=0.05 plots(only)=(diagnostics residuals&lt;BR /&gt;observedbypredicted);&lt;BR /&gt;where CCCF1 is not missing and DHH_SEX is not missing and SPT_01 is not&lt;BR /&gt;missing and INCGHH is not missing;&lt;BR /&gt;ods select DiagnosticsPanel ResidualPlot ObservedByPredicted;&lt;BR /&gt;model PMHDSCR=&amp;amp;_GLSMOD /;&lt;BR /&gt;run;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;proc delete data=Work.reg_design;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 23 Mar 2019 13:24:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Running-an-MLR-model-with-an-interaction-term/m-p/545478#M7282</guid>
      <dc:creator>ValSki</dc:creator>
      <dc:date>2019-03-23T13:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: Running an MLR model with an interaction term</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Running-an-MLR-model-with-an-interaction-term/m-p/545487#M7285</link>
      <description>&lt;P&gt;This is a great example of why I always avoid regression variable selection methods, such as PROC GLMSELECT when you have x-variables that are correlated with one another. The correlation between the x-variables means that two different models can have no resemblance to one another when you look at the parameter estimates.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;So, that's the interpretation ... the correlation between the x-variables causes these models to be very different. Also, in Model 1, you have the interaction NSIDSC*CCCF1 entered into the model before the main effect of NSIDSC, and so the main effect of NSIDSC cannot be estimated. The order makes a difference here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Confusing? Yes. That's where multiple linear regression takes you, to confusing-land, when you have correlated x-variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So what is the solution? I suggest a solution that does not have these drawbacks, which performs better in the case of correlation x-variables, and the above confusion is minimized. The order of the variables has no impact, and the coefficients don't swing wildly because of the presence or non-presence of a term in the model. That solution is called Partial Least Squares regreesion, which can be found in SAS PROC PLS.&lt;/P&gt;</description>
      <pubDate>Sat, 23 Mar 2019 16:03:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Running-an-MLR-model-with-an-interaction-term/m-p/545487#M7285</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-03-23T16:03:42Z</dc:date>
    </item>
    <item>
      <title>Re: Running an MLR model with an interaction term</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Running-an-MLR-model-with-an-interaction-term/m-p/545498#M7286</link>
      <description>&lt;P&gt;&lt;SPAN&gt;All the predictors, including the interaction are run simultaneously. I tried to rearrange the order of my predictors, as I suspected the order is influencing the results but regardless of the set-up, NSIDSC still gave me a zero slope. I'll have to take a look into using proc pls instead. Hopefully, that will help.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 23 Mar 2019 16:51:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Running-an-MLR-model-with-an-interaction-term/m-p/545498#M7286</guid>
      <dc:creator>ValSki</dc:creator>
      <dc:date>2019-03-23T16:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: Running an MLR model with an interaction term</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Running-an-MLR-model-with-an-interaction-term/m-p/545504#M7287</link>
      <description>&lt;P&gt;Why use proc GLMSELECT (without selection and with param=GLM) and proc REG instead of proc GLM? What's the advantage?&lt;/P&gt;</description>
      <pubDate>Sat, 23 Mar 2019 17:37:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Running-an-MLR-model-with-an-interaction-term/m-p/545504#M7287</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-03-23T17:37:11Z</dc:date>
    </item>
    <item>
      <title>Re: Running an MLR model with an interaction term</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Running-an-MLR-model-with-an-interaction-term/m-p/545511#M7288</link>
      <description>&lt;P&gt;You are right that parameter estimates may change when you change the order of terms in the model. Try, for example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods select ParameterEstimates;
proc glm data=sashelp.heart plots=none;
class sex;
model weight = sex*height height sex / solution;
run; quit;

ods select ParameterEstimates;
proc glm data=sashelp.heart plots=none;
class sex;
model weight = height sex sex*height / solution;
run; quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The two models are mathematically equivalent. But because glm is overparameterized, some terms must be declared redundant. The two models only differ in the choice of redundant terms.&lt;/P&gt;</description>
      <pubDate>Sat, 23 Mar 2019 18:05:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Running-an-MLR-model-with-an-interaction-term/m-p/545511#M7288</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-03-23T18:05:39Z</dc:date>
    </item>
    <item>
      <title>Re: Running an MLR model with an interaction term</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Running-an-MLR-model-with-an-interaction-term/m-p/545517#M7289</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/267601"&gt;@ValSki&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;SPAN&gt;All the predictors, including the interaction are run simultaneously. I tried to rearrange the order of my predictors, as I suspected the order is influencing the results but regardless of the set-up, NSIDSC still gave me a zero slope. I'll have to take a look into using proc pls instead. Hopefully, that will help.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It did NOT give you an NSIDSC slope of zero. It said it could not estimate the slope for NSIDSC. There is a difference.&lt;/P&gt;</description>
      <pubDate>Sat, 23 Mar 2019 19:11:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Running-an-MLR-model-with-an-interaction-term/m-p/545517#M7289</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-03-23T19:11:33Z</dc:date>
    </item>
  </channel>
</rss>

