For models with linear and squared terms, Stata tip 118 recommends regressing the square on the linear and then regressing the real Y on the linear and residuals of the first stage regression.
I'm having trouble seeing how this does anything except fix the reported colinearity diagnostics. Here is what I'm running:
clear
set obs 2000
g x=5 + runiform()
g xx=x*x
g y = x + xx + rnormal()
reg xx x
predict xxrc,resid
reg y x xxrc
reg y x xx
I do get a different parameter on the main effect (which I should since I've changed the zero point) but it is generally further from the parameter in the simulated data. It is closer to the parameter on x from running regress y x. I get identical parameter estimates and standard errors on the squared term.
What am I missing?
Phil
I'm having trouble seeing how this does anything except fix the reported colinearity diagnostics. Here is what I'm running:
clear
set obs 2000
g x=5 + runiform()
g xx=x*x
g y = x + xx + rnormal()
reg xx x
predict xxrc,resid
reg y x xxrc
reg y x xx
I do get a different parameter on the main effect (which I should since I've changed the zero point) but it is generally further from the parameter in the simulated data. It is closer to the parameter on x from running regress y x. I get identical parameter estimates and standard errors on the squared term.
What am I missing?
Phil
Comment