Statalist


[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 <baum@bc.edu>
To   statalist@hsphsun2.harvard.edu
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 http://pped.org/card.dta, 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   |   http://ideas.repec.org/e/pba1.html
An Introduction to Stata Programming | http://www.stata-press.com/books/isp.html
   An Introduction to Modern Econometrics Using Stata  |   http://www.stata-press.com/books/imeus.html

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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