Statalist


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

st: Logit and the Clustered Bootstrap


From   L S <[email protected]>
To   [email protected]
Subject   st: Logit and the Clustered Bootstrap
Date   Thu, 27 Aug 2009 14:53:19 -0700

Hello,

I am trying to perform a clustered bootstrap in which I also include
fixed effects for the variable serving as the cluster identifier.  For
cross-sectional data on individuals in different states, I would like
to do a bootstrap that clusters by state, but also includes state
fixed effects.

A difficulty with doing this is that this often doesn’t seem to work
with logit.  Here is some code that illustrates the point:

clear
set more off
sysuse citytemp

forvalues i = 2/9{
	gen z`i'=(division==`i')
}

gen round_heatdd = round(heatdd)

gen odd = mod(round_heatdd,2)
drop if odd==.

reg odd tempjan z2-z9, cluster(division)
logit odd tempjan z2-z9, cluster(division)
bootstrap, cluster(division) reps(200) seed(1234): reg odd tempjan z2-z9
bootstrap, cluster(division) reps(200) seed(1234): logit odd tempjan z2-z9

Reg and Logit each run fine with clustered standard errors in
non-bootstrapped form, as does the Reg bootstrap.  For the logit
bootstrap, the following error arises:

“insufficient observations to compute bootstrap standard errors
no results will be saved”

In other examples with logit and cluster-level fixed effects, STATA
will actually run through completely, but with the bootstrap working
on a small number of replications (instead of on zero).  For example,
if one includes only some of the fixed effects, this will occur:

bootstrap, cluster(division) reps(200) seed(1234): logit odd tempjan z2-z5

Does anyone know what is causing the bootstrap to fail to run normally
here?  Is there anything I can do so that the logit with a clustered
bootstrap will run?

Thank you.

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index