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: option bw() for ivreg2?


From   "Schaffer, Mark E" <M.E.Schaffer@hw.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: option bw() for ivreg2?
Date   Tue, 29 Jan 2013 22:56:46 -0000

Anja,

> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-
> statalist@hsphsun2.harvard.edu] On Behalf Of Anja Lambrecht
> Sent: 29 January 2013 20:42
> To: statalist@hsphsun2.harvard.edu
> Subject: RE: st: option bw() for ivreg2?
> 
> Thanks!
> 
> Both were the case.
> 
> I reinstalled ivreg2 and now have the most up-to-date version
> 
> When using ivreg2 I was using panel data and dummies to capture the
fixed
> effects (only 6 needed). When I now do the same in the updated version
I
> indeed get the error message below. Same for xtivreg2 when specifying
> fixed effects but excluding the dummies.
> 
> My panel variable only has six values. So I could perhaps run ivreg2
with
> bw(auto) for each one separately and let it determine the bandwidth,
then
> use this in xtivreg2. Would such an approach be appropriate?

The bw(auto) option isn't enabled for xtivreg2  because the work behind
automatic bandwidth selection that is implemented wasn't done for the
panel case.  What you propose sounds sensible, but I don't know whether
this has been explored in the literature.  You might want to google
around.

> Lastly, when I try to run the model with newey instead of ivreg2 I get
the
> message that time-variable is not regularly spaced. Indeed, there are
> occasionally days missing in my panel. But I do not get the message
with
> ivreg2. Does this mean that ivreg2 is not sensitive to whether the
time-
> variable is regularly spaced?

It means ivreg2 isn't bothered by it, and correctly accounts for gaps in
the data.  We aim to please!

--Mark

> Or is it still not appropriate to use ivreg2? In that
> case, what do you recommend when there are missing observations in the
> panel?
> 
> Thanks again,
> Anja
> 
> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-
> statalist@hsphsun2.harvard.edu] On Behalf Of Christopher Baum
> Sent: 29 January 2013 18:39
> To: statalist@hsphsun2.harvard.edu
> Subject: re: st: option bw() for ivreg2?
> 
> <>
> Anja said
> 
> I'm estimating a panel model with ivreg2 and want to use the option
for
> heteroskedastic and autocorrelation-consistent standard errors. In
previous
> discussions the automatic bandwidth selection option bw(auto) was
> recommended. However, I always get the message "invalid bandwidth in
> option bw() - must be integer > 0" and also the help text does not
seem to
> mention this option. Is it not implemented anymore or is it possible
to go
> back to previous versions of stata to use this? I am not sure which
level is
> appropriate, hence the option would be really useful.
> 
> 
> .which ivreg2
> 
> *! ivreg2 3.1.06  27Dec2012
> 
> . webuse lutkepohl,clear
> (Quarterly SA West German macro data, Bil DM, from Lutkepohl 1993
Table
> E.1)
> 
> . ivreg2 investment (income = L(1/3).income), robust bw(auto)
> 
> IV (2SLS) estimation
> --------------------
> 
> Estimates efficient for homoskedasticity only Statistics robust to
> heteroskedasticity and autocorrelation
>   kernel=Bartlett; bandwidth=20
>   Automatic bw selection according to Newey-West (1994)
>   time variable (t):  qtr
> 
> 
> Works fine for me. It sounds like you do not have the most up-to-date
> version of the program installed from SSC, as the current help file
includes "
> When using the Bartlett, Parzen, or Quadratic spectral kernels, the
automatic
> bandwidth selection procedure of Newey and West (1994) can be chosen
by
> specifying bw(auto)."
> 
> However, if this is panel data, you should be using -xtivreg2-, not
-ivreg2-.  If
> you try using bw(auto) with panel data, you will get
> 
> .webuse grunfeld
> 
> . ivreg2 invest (mvalue=L(1/2).kstock), robust bw(auto) Automatic
> bandwidth selection not available for panel data r(198);
> 
> but not the error message you mention.  Note that Mark Schaffer's
-xtivreg2-
> does not support auto bw selection.
> 
> Kit
> 
> 
> 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
>
|
> http://www.crup.com.cn/Item/111779.aspx
> 
> 
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/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/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/


----- 
Sunday Times Scottish University of the Year 2011-2013
Top in the UK for student experience
Fourth university in the UK and top in Scotland (National Student Survey 2012)


We invite research leaders and ambitious early career researchers to 
join us in leading and driving research in key inter-disciplinary themes. 
Please see www.hw.ac.uk/researchleaders for further information and how
to apply.

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/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index