OLS with restrictions
OLS with restrictions
I am replicating the econometric analysis of a published paper in which RATS was used. I am using MATLAB and other statistical tools for the purpose of replication. I have been able to match almost all numbers except for cases when a restriction is imposed on a linear regression using "restrict".
For example, in the following analysis,
linreg(robusterrors,damp=0,lags=n-1) y / res
#constant x1 x2 x3
restrict(create) 1
#2
#1 1
I can match the results completely for the unrestricted regression. I evaluated the restricted regression by regressing y-x1 on an intercept, x2 and x3 and the results do not match with the numbers from RATS. I also used the closed form expression for restricted least squares and they still don't match with RATS even though my own numbers are the same in both cases. (My numbers match with results from other statistical software that use built-in functions). Could there be an explanation for this mismatch? The original analysis was performed in 2006 and used the version of RATS available then. Any help would be highly appreciated! Thanks.
For example, in the following analysis,
linreg(robusterrors,damp=0,lags=n-1) y / res
#constant x1 x2 x3
restrict(create) 1
#2
#1 1
I can match the results completely for the unrestricted regression. I evaluated the restricted regression by regressing y-x1 on an intercept, x2 and x3 and the results do not match with the numbers from RATS. I also used the closed form expression for restricted least squares and they still don't match with RATS even though my own numbers are the same in both cases. (My numbers match with results from other statistical software that use built-in functions). Could there be an explanation for this mismatch? The original analysis was performed in 2006 and used the version of RATS available then. Any help would be highly appreciated! Thanks.
Re: OLS with restrictions
Do it without the HAC standard errors on the LINREG. HAC standard errors change the restricted coefficients---see the formulas in Section 3.2 of the User's Guide, where the second line will be used in each calculation. With a straight LINREG, the RESTRICT instruction will compute the least squares restricted regression which will match the rearranged regression that you ran (it uses the first line in Section 3.2).
Re: OLS with restrictions
Thank you, Tom, very much for the explanation. Do you then know how to code the restricted OLS without HAC standard errors? What command line should I use?
Thank you.
Yelena
Thank you.
Yelena
Re: OLS with restrictions
If you take the ROBUSTERRORS and LAGS options off the LINREG, then the RESTRICT(CREATE) will give you the least squares estimates of the restricted regression.
Re: OLS with restrictions
I thought that we use this option ROBUSTERRORS to take care of heteroscedasticity. If we omit it, what would happen? Will we simply get an OLS with restricted coefficients?