# R squared change multiple linear regression

I calculate multiple linear regression in R with

lm(var ~ VAR1+VAR2+VAR3+VAR4)


Do you know how to calculate R-squared change for each variable VAR1, VAR2, VAR3 ? Thank you

• r.789695.n4.nabble.com/… Aug 2, 2013 at 11:16
• Can you clarify what you mean here? Eg, what do you want to do w/ this information when you get it? Are you wondering how to conduct the R-squared change test? Do you want to know the variance in var marginally associated w/ each VAR, or partially associated? etc. Aug 2, 2013 at 15:30
• I want to get the contribution of each variables VAR1, VAR2, VAR3, etc to explain var. Aug 6, 2013 at 15:12

The OP essentially wants to calculate the $R^2$ differences for individual variables. So the models would be:

m0 = lm(var ~ VAR1 + VAR2 + VAR3)
m1 = lm(var ~ VAR2 + VAR3)
m2 = lm(var ~ VAR1 + VAR3)
m3 = lm(var ~ VAR1 + VAR2)


And then you can do

pr2m1 = summary(m0)$r.squared-summary(m1)$r.squared
pr2m2 = summary(m0)$r.squared-summary(m2)$r.squared
pr2m3 = summary(m0)$r.squared-summary(m3)$r.squared


But this probably doesn't do what you think it does (explain exactly how much the individual variables explain via the $R^2$ difference) - at least if there is any multicollinearity (which there usually is).

• summary(m0)\$r.squared works for me, not name subscripting... Aug 2, 2013 at 16:40

Why not computing all the nested models ?

lm(var ~ VAR1)
lm(var ~ VAR1 + VAR2)
lm(var ~VAR1 + VAR2 + VAR3)