[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: re: standard error of a Wald estimator and -nlcom-

From   Kit Baum <>
Subject   st: re: standard error of a Wald estimator and -nlcom-
Date   Wed, 14 Oct 2009 21:34:26 -0400

This gets a bit closer. Note that you don't want to mix t's and z's. - ivreg2- from ssc will by default use z's, as does -suest- by default.

use, clear
ivreg2 lwage exper nearc4, nohead r
scalar b1=_b[nearc4]
scalar s1=_se[nearc4]
ivreg2 educ exper nearc4, nohead r
scalar b2=_b[nearc4]
scalar s2=_se[nearc4]

qui reg lwage exper nearc4
est sto r1
qui reg educ exper nearc4, nohe
est sto r2
suest r1 r2
mat v=e(V)
matrix cov=v["r1_mean:nearc4","r2_mean:nearc4"]
scalar c=cov[1,1]

scalar one = b1 / b2 * sqrt((s2 / b2)^2+(s1 / b1)^2-2*c / b1 / b2)
nlcom [r1_mean]_b[nearc4]/[r2_mean]_b[nearc4]
mat vv = r(V)
scalar two = sqrt(vv[1,1])
di %15.12f one " " %15.12f two " " %15.12f one-two

Kit Baum   |   Boston College Economics & DIW Berlin   |
An Introduction to Stata Programming |
   An Introduction to Modern Econometrics Using Stata  |

*   For searches and help try:

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