Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Re: newey2 vs ivreg2


From   "Clive Nicholas" <[email protected]>
To   [email protected]
Subject   Re: st: Re: newey2 vs ivreg2
Date   Fri, 14 Jan 2005 22:28:11 -0000 (GMT)

Kit Baum replied:

> But in including robust to get H-AC std errors you took out the -small-
> option, so you're comparing t-stats with z-stats.

Quite right. First problem solved. To use my own data:

. newey2 conch el1983-el2001 if !inlist(_n, 379) [aw=weight], lag(1) force

Regression with Newey-West standard errors        Number of obs  =      3451
maximum lag : 1                                   F(  5,  3445)  =   1747.84
                                                  Prob > F       =    0.0000
----------------------------------------------------------------------------
           |             Newey-West
     conch |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-----------+----------------------------------------------------------------
    el1983 |  -9.470202   .2210995   -42.83   0.000    -9.903702   -9.036703
    el1987 |  -8.534744   .2023425   -42.18   0.000    -8.931467    -8.13802
    el1992 |  -8.850865    .171069   -51.74   0.000    -9.186272   -8.515458
    el1997 |  -19.38584   .2086105   -92.93   0.000    -19.79485   -18.97682
    el2001 |  -7.284097   .1915389   -38.03   0.000    -7.659638   -6.908555
     _cons |   7.956494   .1334872    59.60   0.000     7.694772    8.218216
----------------------------------------------------------------------------

. ivreg2 conch el1983-el2001 if !inlist(_n, 379) [aw=weight], bw(2) robust
small
(sum of wgt is   3.4499e+03)

OLS regression with robust standard errors
------------------------------------------
Heteroskedasticity and autocorrelation-consistent statistics
  kernel=Bartlett; bandwidth=2
  time variable (t):  election
  group variable (i): pano
                                                    Number of obs =     3451
                                                    F(  5,  3445) =  1747.84
                                                    Prob > F      =   0.0000
Total (centered) SS     =  152718.5772              Centered R2   =   0.7237
Total (uncentered) SS   =  155933.7759              Uncentered R2 =   0.7294
Residual SS             =  42188.62656              Root MSE      =      3.5
----------------------------------------------------------------------------
           |               Robust
     conch |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-----------+----------------------------------------------------------------
    el1983 |  -9.470202   .2210995   -42.83   0.000    -9.903702   -9.036703
    el1987 |  -8.534744   .2023425   -42.18   0.000    -8.931467    -8.13802
    el1992 |  -8.850865    .171069   -51.74   0.000    -9.186272   -8.515458
    el1997 |  -19.38584   .2086105   -92.93   0.000    -19.79485   -18.97682
    el2001 |  -7.284097   .1915389   -38.03   0.000    -7.659638   -6.908555
     _cons |   7.956494   .1334872    59.60   0.000     7.694772    8.218216
----------------------------------------------------------------------------

Thanks very much for the solution. This is excellent (especially as
-ivreg2- accepts -pweight-s), and I can work out most goodness-of-fit
diagnostics from there.

But as my second query notes, it's often a good idea to control for
'higher-level' clustering effects. In my data, constituencies can be
grouped into regions. As it says in -whelp ivreg2-:

"...-cluster- standard errors are robust to both arbitrary
heteroskedasticity and arbitrary intra-group correlation..."

I think I have it right that the first of these (on its own) is dealt with
by using the -robust- option; the second refers to what I'm now looking to
control. As I said a few days ago, this is easily done with -areg-, but
when I try to do this using -ivreg2-, I get:

. ivreg2 conch el1983-el2001 if !inlist(_n, 379) [aw=weight], bw(2) robust
cluster(region) small
cannot use HAC kernel estimator with -cluster- option
r(198);

This is odd, since later on in -whelp ivreg2-, it explicitly states that
the -robust- and -cluster()- options can be used together:

"...-robust- combined with -cluster()- further allows residuals which are
not independent within cluster (although they must be independent between
clusters)."

This is _precisely_ what I'm looking for, since including these
higher-level fixed effects as variables is not the proper way to solve
this issue. It also says that specifying -cluster()- implies -robust- (as
well as saying that -pweight-s can also be used), but unfortunately, I
get:

. ivreg2 conch el1983-el2001 if !inlist(_n, 379) [pw=weight], bw(2)
cluster(region) small
cannot use HAC kernel estimator with -cluster- option
r(198);

I get exactly the same errors if I use the -garmit- dataset. I really hope
there is a workaround to this, as I don't think I'm doing a lot wrong
here.

CLIVE NICHOLAS        |t: 0(044)7903 397793
Politics              |e: [email protected]
Newcastle University  |http://www.ncl.ac.uk/geps

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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