stata10里面有 xtmelogit
Title
[XT] xtmelogit -- Multilevel mixed-effects logistic regression
Syntax
xtmelogit depvar [fe_equation] || re_equation [|| re_equation ...] [, options]
and where the syntax of fe_equation is
indepvars [if] [in] [, fe_options]
and the syntax of re_equation is one of:
for random coefficients
levelvar: [varlist] [, re_options]
for a random effect among the levels of a factor variable
levelvar: R.varname [, re_options]
where levelvar is the grouping variable for the random effects at that level, or _all for the inclusive group
comprising all observations.
fe_options description
--------------------------------------------------------------------------------------------------------------
Model
noconstant suppress the constant from the fixed-effects equation
offset(varname) include varname in model with coefficient constrained to 1
--------------------------------------------------------------------------------------------------------------
re_options description
--------------------------------------------------------------------------------------------------------------
Model
covariance(vartype) variance-covariance structure of the random effects
noconstant suppress the constant from the random-effects equation
collinear keep collinear variables
--------------------------------------------------------------------------------------------------------------
options description
--------------------------------------------------------------------------------------------------------------
Model
binomial(varname|#) set binomial trials if data are in binomial form
Integration
laplace use Laplacian approximation; equivalent to intpoints(1)
intpoints(# [# ...]) set the number of integration (quadrature) points; default is 7
Reporting
level(#) set confidence level; default is level(95)
or report fixed-effects coefficients as odds ratios
variance show random-effects parameter estimates as variances and covariances
noretable suppress random-effects table
nofetable suppress fixed-effects table
estmetric show parameter estimates in the estimation metric
noheader suppress output header
nogroup suppress table summarizing groups
nolrtest do not perform LR test comparing to logistic regression
Max options
maximize_options control the maximization process during gradient-based optimization; seldom
used
retolerance(#) tolerance for random-effects estimates; default is retolerance(1e-8); seldom
used
reiterate(#) maximum number of iterations for random-effects estimation; default is
reiterate(50); seldom used
matlog parameterize variance components using matrix logarithms
refineopts(maximize_options) control the maximization process during refinement of starting values
--------------------------------------------------------------------------------------------------------------
vartype description
--------------------------------------------------------------------------------------------------------------
independent one variance parameter per random effect, all covariances zero; the default unless a
factor variable is specified
exchangeable equal variances for random effects, and one common pairwise covariance
identity equal variances for random effects, all covariances zero; the default for factor
variables
unstructured all variances-covariances distinctly estimated
--------------------------------------------------------------------------------------------------------------
indepvars and varlist may contain time-series operators; see tsvarlist.
bootstrap, by, jackknife, rolling, statsby, and xi are allowed; see prefix.
See [XT] xtmelogit postestimation for features available after estimation.
Description
xtmelogit fits mixed-effects models for binary/binomial responses. Mixed models contain both fixed effects
and random effects. The fixed effects are analogous to standard regression coefficients and are estimated
directly. The random effects are not directly estimated (although they may be obtained postestimation) but
are summarized according to their estimated variances and covariances. Random effects may take the form of
either random intercepts or random coefficients, and the grouping structure of the data may consist of
multiple levels of nested groups. The distribution of the random effects is assumed to be Gaussian. The
conditional distribution of the response given the random effects is assumed to be Bernoulli, with success
probability determined by the logistic cumulative distribution function (c.d.f.). Since the log likelihood
for this model has no closed form, it is approximated by adaptive Gaussian quadrature.