Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.

# st: error while doing IV

 From Arka Roy Chaudhuri To statalist@hsphsun2.harvard.edu Subject st: error while doing IV Date Sun, 26 Sep 2010 22:51:49 -0700

```Hi,
I am having some problems in estimating a IV regression.It would be

I have the following variables in my data set:districtid, average
residual gender wage gap in a district(avggap), scaled district
tariff(district_tariff_scaled), unscaled district
tariffs(district_tariff_unscaled), a set of district
dummies(_Idistricti*), a time dummy since I have two time
periods(time), district population(district_popn). I am interested in
looking at the effect of scaled district tariffs on the average
residual gender wage gap using the unscaled district tariffs as
instruments for district tariffs. I run the following 3 regressions(I
use the district population as weights and cluster over districts to
correct for standard errors):-

1)regress avggap district_tariff_scaled  time _Idistricti*
[aweight=district_popn],cluster(districtid)
In this regression I look at the structural equation i.e the effect of
scaled district tariffs on average gender wage gap. I do not get any
error in this case.

2)regress avggap district_tariff_unscaled  time _Idistricti*
[aweight=district_popn],cluster(districtid)
In this regression I l look at the reduced form relationship between
unscaled tariffs and the average gender wage gap. I do not get any
error in this case.

3)ivregress 2sls avggap (district_tariff_scaled
=district_tariff_unscaled) time _Idistricti*
[aweight=district_popn],cluster(districtid)
This is the equation that I have problem estimating.I use the unscaled
tariffs as instruments for the scaled tariffs.However Stata gives me
the following error:

ivregress 2sls avggap (district_tariff_scaled
=district_tariff_unscaled) time _Idistricti*
[aweight=district_popn],cluster(districtid)
(sum of wgt is   0.0000e+00)
no observations
r(2000);

Surprisingly if I estimate the third equation without clustering over
the districts Stata gives me results without any error.I tried using
the vce option instead of the cluster option but I get the same error.
I do not understand why clustering over districts does not create any
problem in the estimation of the first two equations while it returns
an error while I am estimating the 3rd equation. Since I am using a
difference in difference approach it is essential that I cluster over
district. I am using Stata11.

I will be really grateful if somebody could help me out with this problem.Thanks

Regards,
Arka
*
*   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/
```