I have a dataset with 8000 clusters and 4 million observations. Unfortunately my statistical software, Stata, runs rather slowly when using its panel data function for logistic regression: `xtlogit`, even with a 10% subsample.

However, when using the nonpanel `logit` function results appear much sooner. Therefore I may be able to benefit from using `logit` on modified data that accounts for fixed effects.

I believe this procedure is coined the "Mundlak fixed effects procedure" (Mundlak, Y. 1978. Pooling of Time-Series and Cross-Section Data. Econometrica, 46(1), 69-85.)

I found an intuitive explanation of this procedure in a paper by [Antonakis, J., Bendahan, S., Jacquart, P., & Lalive, R. (2010). On making causal claims: A review and recommendations. The Leadership Quarterly, 21(6). 1086-1120.](http://www.hec.unil.ch/jantonakis/Causal_Claims.pdf) I quote:

> 
> One way to get around the problem of omitted ﬁxed effects and to still
>  include Level 2 variables is to include the cluster means of all Level
>  1 covariates in the estimated model (Mundlak, 1978). The cluster means
>  can be included as regressors or subtracted (i.e., cluster-mean
>  centering) from the Level 1 covariate. The cluster means are invariant
>  within cluster (and vary between clusters) and allow for consistent
>  estimation of Level 1 parameters just as if ﬁxed-effects had been
>  included (see Rabe-Hesketh & Skrondal, 2008).
> 
> 
> 

Therefore cluster-mean centering seems ideal and practical for solving my computational problem. However, these papers seem to be geared towards linear regression (OLS).

Is this method of cluster-mean centering also applicable for "replicating" fixed effects binary logistic regression?

A more technical question that should result in the same answer would be: is `xtlogit depvar indepvars, fe` with dataset A equal to `logit depvar indepvars` with dataset B when dataset B is the cluster-mean centered version of dataset A?

An added difficulty I found in this cluster-mean centering is how to cope with dummies. Because dummies are either 0 or 1, are they identical in random and fixed effects regression? Should they not be "centered"?