Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

[no subject]

From   "Paolo Caruso" <>
To   <>
Date   Thu, 23 Mar 2006 11:41:34 +0000

This is a question with regards to IV's.

I am using STATA in order to do a 2SLS. STATA does not allow you to specify which variables to include or not include in the first stage. This means that I have to complete the regression in the separate two stages.

I know how to adjust the MSE when I have one variable that I want to instrument, however, I do not know how to do it when I have more than one.

The command lines in stata to adjust the MSE for one variable are as follows:
regress d7unit variable list instrument(s)
predict double d7unithat
regress loginc variable list d7unithat
rename d7unithat d7unithold
rename d7unit d7unithat
predict double res, residual
rename d7unithat d7unit
rename d7unithold d7unithat
replace res = res^2
summarize res
scalar realmse = r(mean)*r(N)/e(df_r)
matrix bmatrix = e(b)
matrix Vmatrix = e(v)
matrix Vmatrix = e(v)* realmse / e(rmse)^2
ereturn post bmatrix Vmatrix, noclear
ereturn display

where d7unit is the variable that I want to instrument and loginc is the dependant variable.

I would also like to instrument d7unit^2 and this is where I am unsure what the relevant command lines would be in order to ensure that the correct MSE is used.

Any help would be much appreciated.



*   For searches and help try:

© Copyright 1996–2020 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index