# Re: st: How to implement Wald estimator (for IV that is a ratio of coefficients)?

 From Austin Nichols To statalist@hsphsun2.harvard.edu Subject Re: st: How to implement Wald estimator (for IV that is a ratio of coefficients)? Date Sun, 11 Oct 2009 09:22:57 -0400

```Misha--
If both equations are estimated in the same data (i.e. you are not
using a two-sample IV procedure), you should use -ivreg- or
-ivregress- or -ivreg2- (on SSC) instead.  The approximate standard
error formula for the two separate estimations on one dataset is not a
good substitute for the one given by an IV estimator:

use http://pped.org/card.dta
reg lwage exper nearc4, nohe r
loc b1=_b[nearc4]
loc s1=_se[nearc4]
reg educ exper nearc4, nohe r
loc b2=_b[nearc4]
loc s2=_se[nearc4]
ivreg lwage exper (educ=nearc4), nohe r
di `b1'/`b2'
di `b1'/`b2'*sqrt((`s2'/`b2')^2+(`s1'/`b1')^2)

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"]
loc c=cov[1,1]
di `b1'/`b2'*sqrt((`s2'/`b2')^2+(`s1'/`b1')^2-2*`c'/`b1'/`b2')

On Sat, Oct 10, 2009 at 3:44 PM, Misha Spisok <misha.spisok@gmail.com> wrote:
> Stas,
>
> Many thanks (большое спасибо), not just for solving this problem but
> introducing me to another command in Stata.
>
> Misha
>
> On Fri, Oct 9, 2009 at 9:39 PM, Stas Kolenikov <skolenik@gmail.com> wrote:
>> See if you can get your standard error via -nlcom- after -reg3-. I
>> would guess that's the most appropriate estimation method, and -nlcom-
>> is certainly the most appropriate method to deal with the
>> delta-method, Stata way.
>>
>> On Fri, Oct 9, 2009 at 8:21 PM, Misha Spisok <misha.spisok@gmail.com> wrote:
>>> Hello, Statalist!
>>>
>>> In short, does -ivregress- (or -reg3-) include what I think is called
>>> the Wald estimator?  If so, how can I implement it for a problem like
>>> the one below?  I've searched for a command for the Wald estimator,
>>> but can only find references to Wald _tests_.
>>>
>>> I am considering a model similar to Ashenfelter and Greenstone (2004)
>>> with two reduced-form equations, the estimates of which are used to
>>> find an instrumental variable estimator in a third equation, the one
>>> of primary interest.
>>>
>>> My question is, how can I do this in Stata in one fell swoop?
>>>
>>> The two equations are
>>>
>>> F = lambda_F*VMT + PI_F*1(65mph limit in force) + epsilon
>>> H = lambda_H*VMT + PI_H*1(65mph limit in force) + epsilon'
>>>
>>> where 1(.) is an indicator variable which I'll call "65mph" below.
>>>
>>> The equation of interest is
>>>
>>> H = beta*VMT + theta*F + nu
>>>
>>> The parameter of interest is theta.  From the estimate of the reduced
>>> form equations the IV for theta, theta_IV, is
>>>
>>> theta_IV = (PI_H)/(PI_F)
>>>
>>> Given estimates of PI_H and PI_F (as presented in the paper), one can
>>> form the corresponding theta_IV.  It seems that the authors use a
>>> formula for the standard error of theta_IV like the following:
>>>
>>> se_theta = theta_IV*sqrt((se_PI_H/PI_H)^2 + (se_PI_F/PI_F)^2)
>>>
>>> I tried doing this in the following ways, but the results are not the
>>> same.  I wouldn't expect them to be, but I can't find a reference for
>>> Wald estimator in Stata, so I thought I'd try it.
>>>
>>> Method 1:
>>> . reg F VMT 65mph
>>> . reg H VMT 65mph
>>> Calculate theta_IV from coefficients on 65mph in the above equations.
>>>
>>> Method 2:
>>> . ivregress 2sls H VMT (F 65mph)
>>> Hope that theta_IV would be the coefficient on F.
>>>
>>> Method 3:
>>> . reg3 (F VMT 65mph) (H VMT F)
>>> Hope that theta_IV would be the coefficient on F in the equation for H.
>>>
>>> What is the correct way to get this ratio of coefficients (theta_IV =
>>> (PI_H)/(PI_F)) and its standard error all at once in Stata?
>>>
>>> Thanks,
>>>
>>> Misha

*
*   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/
```