Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: vce(boot) - clustering?

From   Scott Cunningham <>
Subject   Re: st: vce(boot) - clustering?
Date   Tue, 11 Apr 2006 11:45:50 -0400

Thank you Stas.  Very helpful. -sc
On Apr 11, 2006, at 11:16 AM, Stas Kolenikov wrote:

Scott was asking about -xtpoisson, vce(bootstrap)-.

I don't think there is anything special to -xtpoisson- with the
bootstrap variance estimation; just see what [R] bootstrap says. To be
on a safe side, I would specify -vce(bootstrap, cluster(id) )- so that
the bootstrap variance estimator knows that your data are clustered
(and that is how -vce(boot)- should default with the -xt- data, but I
don't know the details in the guts of Stata). This will produce "kind
of" cluster standard errors (and -cluster- is a generalization of
-robust-, so you are getting both for the price of one).

There's still a caveat with dependent data: you need to resample fewer
clusters than there were in the original data, at least as suggested
by Rao & Wu (1988), see below. I would imagine that this is even more
important with the discrete data, such as Poisson regression models.
Rao & Wu (1988) suggest using #clusters-3, to match the third moments
of the bootstrap and the empirical third moments. I don't know how you
would go about it in Stata; it gives you an option -size()- for the
bootstrap samples, but it looks like it is applicable to the data set
as a whole -- doesn't look like those two options are compatible with
one another :((. (Stata Corp., can you possibly fix -bsample- so that
it respects -size()- along with -cluster-, with understanding that
-size()- means the number of clusters to be resampled?)

And finally to make your results reproducible, you would want to
specify -set seed- right before your -xtpoisson- command.

I'd be hugely surprised if the bootstrap standard errors were way off
the analytical standard errors; and if they were, I would still trust
the analytical vce better than the bootstrap vce, as it is more
difficult to get the proper bootstrap vce in a clustered situation.
Remember that the bootstrap sampling should exactly reproduce the
sampling process and the dependencies in your data; if you fail to do
so, the bootstrap will be severely biased. So the panel bootstrap
should go about with the panels as a whole, and probably with
attrition within the panels if you were really fair :)).


Resampling Inference With Complex Survey Data
J. N. K. Rao; C. F. J. Wu
Journal of the American Statistical Association, Vol. 83, No. 401.
(Mar., 1988), pp. 231-241. 3C231%3ARIWCSD%3E2.0.CO%3B2-O

On 4/11/06, Scott Cunningham <> wrote:

I'm estimating a Poisson with fixed effects model using -xtpoisson-.
To correct for overdispersion, I am using -vce(boot)- to bootstrap
the standard errors.  Where can I find a description of the algebra
used for -vce(boot)- when attached to the -xtpoisson- command?  I
tried -help vce(boot)- and -help xtpoisson- but didn't see anything.
Also, am I correct that -xi: xtpoisson depvar indepvar, fe i(id) vce
(boot)- will create robust and clustered standard errors?

*   For searches and help try:

Stas Kolenikov

*   For searches and help try:
*   For searches and help try:

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