BookmarkSubscribeRSS Feed
csharper
Fluorite | Level 6

I used glm procedure to test dep_var = independ_var1, and get the coefficient and p value of independ_var1.

Now I want to add another independ_var2 to the linear model. Is there a test to see if adding this new variable alters the correlation between  independ_var1 and dep_var? By altering, I mean the magnitude of correlation and significant level (p value).

Thank you.

5 REPLIES 5
csharper
Fluorite | Level 6

Thanks PaigeMiler. It looks like the "Extra Sum of Squares Principle" compares the two models, not exact what I was asking.

In My question, first I have a simple regression model

Dep_var = Indept_var1

I can model this with glm and get the slope of Indept_var1, and a p value

Then I can do another model with glm

Dep_var = Indept_var1 + Indept_var2

I get the slope and p values of Indept_var1. Of course, I also solve that for Indept_var2 too, but that's not quite the concern here.

I want to know if there is a statistical test to see if the slope and p values for Indept_var1 are different between the two models.

 

Thanks.

PaigeMiller
Diamond | Level 26

I'll have to think about this. It's not clear to me that a statistical test to compare the slope of X1 from Model 1 is the same as the slope of X1 from Model 2 makes any logical sense. They will be different, by definition, since the models are different (unless all of the variables in the model are orthogonal to one another, in which case they will be identical, by definition). A statistical test would test to see if the numbers are different due to randomness, yet I claim they are different by definition, not due to randomness.

 

This is a somewhat difficult philosophical point, I'm going to think about it more.

--
Paige Miller
csharper
Fluorite | Level 6

The real question is "Does adding Indept_var2 into the model alter the relationship between Dept_var and Indept_var1?"

I kind of separated this into two Parts (1) does it change the slope of Indept_var1? (2) Does it change the significant of Indept_var1?

That is what I could come up to approach the "real question". Maybe there is a different (better) way to look at this.

Thanks for your help.

PaigeMiller
Diamond | Level 26

@csharper wrote:

The real question is "Does adding Indept_var2 into the model alter the relationship between Dept_var and Indept_var1?"


Yes, by definition, with mathematical certainty, the estimates of the slope of indep_var1 change (unless indep_var2 is orthogonal to indep_var1). No statistical test needed. I don't think your question is valid from a purely statistical point of view. I'm going to leave it there ... maybe someone else has some other opinion.

--
Paige Miller

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 5 replies
  • 464 views
  • 0 likes
  • 2 in conversation