help r2_mz


r2_mz - McKelvey & Zavoina's R2 for multilevel logistic regression and random effects logit and probit models




r2_mz is a post-estimation command that computes McKelvey & Zavoina's R2 for multilevel logistic regression, random effects, and fixed effects logit and probit models. At least for fixed effects models, according to Windmeijer (1995) "... it seems to be the best measure to use" (p. 114). r2_mz works after the following: xtmelogit, xtlogit, xtprobit, logit, logistic, probit.


. webuse towerlondon, clear . xtmelogit dtlm difficulty || family: || subject: . r2_mz

Saved Results

r2_mz adds the following in e():

Scalars e(r2_mz) McKelvey & Zavoina's R2 e(deviance) Model Deviance e(Var_u) Total Variance of Random Effects e(Var_u#) Variance of Level-# random effects


Windmeijer, F. A. G. (1995). Goodness-of-fit measures in binary choice models. Econometric Reviews, 14, 101-116.

Also see

Manual: [R] xtmelogit, xtlogit, xtprobit Online: Help for xtmelogit, xtlogit, xtprobit; ssc package fitstat (click here) Web: Stata's Home


Thanks to Ulrich Kohler (WZB Berlin) for providing a template of the Mata program used!


Dirk Enzmann Institute of Criminal Sciences, Hamburg email: