Bookmark and Share

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


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

RE: st: RE: error while doing IV


From   "Schaffer, Mark E" <[email protected]>
To   <[email protected]>
Subject   RE: st: RE: error while doing IV
Date   Tue, 28 Sep 2010 08:57:59 +0100

Arka,

As Kit pointed out, the difference in SEs is because you need to use the -small- option in -ivreg2- to get the traditional small-sample adjustment.

With respect to your original problem, it looks like the fault lies with -ivregress-.

Looking at it more closely, the message it generates just before it fails,

(sum of wgt is   0.0000e+00)

is very peculiar, but could be part of the explanation.  If every observation gets a zero weight, then it's understandable that -ivregress- would fail with the message

no observations
r(2000);

But then I don't see why -ivreg- and -ivreg2- aren't caught by this as well.

Maybe it's a problem with your weights?  What does your weight variable look like?  Are the individual weights very, very small?  Does the sum of weights reported by -ivreg- or -ivreg2- match what -ivregress- reports?

--Mark

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of 
> Arka Roy Chaudhuri
> Sent: Tuesday, September 28, 2010 1:12 AM
> To: [email protected]
> Subject: Re: st: RE: error while doing IV
> 
> Hi,
> 
>  Mark thanks a lot for your help.ivreg and ivreg2 works fine with my
> data. However the puzzling thing is that I get different estimates of
> the standard errors under ivreg and ivreg2.Could you please point out
> the possible source of this difference?Thanks
> 
> Regards,
> Arka
> 
> On Mon, Sep 27, 2010 at 3:28 PM, Schaffer, Mark E 
> <[email protected]> wrote:
> > Arka,
> >
> >> -----Original Message-----
> >> From: [email protected]
> >> [mailto:[email protected]] On Behalf Of
> >> Arka Roy Chaudhuri
> >> Sent: 27 September 2010 06:52
> >> To: [email protected]
> >> Subject: st: error while doing IV
> >>
> >> Hi,
> >>   I am having some problems in estimating a IV regression.It
> >> would be great if somebody could please help me with my problem.
> >>
> >> 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.
> >
> > You might want to try estimating your IV equation with 
> -ivreg- (out of
> > date and undocumented in Stata 11, but still works) or -ivreg2-
> > (downloadable from SSC in the usual way).  This would 
> probably tell you
> > if your problem is specific to your estimation or whether 
> it's specific
> > to -ivregress-.
> >
> > Cheers,
> > Mark
> >
> >>
> >> 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/
> >>
> >
> >
> > --
> > Heriot-Watt University is a Scottish charity
> > registered under charity number SC000278.
> >
> >
> > *
> > *   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/
> >
> 
> *
> *   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/
> 


-- 
Heriot-Watt University is a Scottish charity
registered under charity number SC000278.


*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index