I use multiple linear regression, I have one dependant variable (var) and several independant variables (varM1, varM2,...)
I use this code in python:
z=array([varM1, varM2, varM3],int32)
n=max(shape(var))
X = vstack([np.ones(n), z]).T
a = np.linalg.lstsq(X, var)[0]
How can I calculate the R-square change for every variable with python ? I would like to see how the regression changes if I add or remove predictor variables.