The class implements the Laplace approximation to the posterior
distribution (fit_map) and a variational Bayes approximation to
the posterior (fit_vb). See the two fit method docstrings for
more information about the fitting approaches.

Parameters:

endog (array-like) – Vector of response values.

exog (array-like) – Array of covariates for the fixed effects part of the mean
structure.

exog_vc (array-like) – Array of covariates for the random part of the model. A
scipy.sparse array may be provided, or else the passed
array will be converted to sparse internally.

ident (array-like) – Array of labels showing which random terms (columns of
exog_vc) have a common variance.

vcp_p (float) – Prior standard deviation for variance component parameters
(the prior standard deviation of log(s) is vcp_p, where s is
the standard deviation of a random effect).

fep_names (list of strings) – The names of the fixed effects parameters (corresponding to
columns of exog). If None, default names are constructed.

vcp_names (list of strings) – The names of the variance component parameters (corresponding
to distinct labels in ident). If None, default names are
constructed.

vc_names (list of strings) – The names of the random effect realizations.

Returns:

Return type:

MixedGLMResults object

Notes

There are three types of values in the posterior distribution:
fixed effects parameters (fep), corresponding to the columns of
exog, random effects realizations (vc), corresponding to the
columns of exog_vc, and the standard deviations of the random
effects realizations (vcp), corresponding to the unique labels in
ident.

All random effects are modeled as being independent Gaussian
values (given the variance parameters). Every column of exog_vc
has a distinct realized random effect that is used to form the
linear predictors. The elements of ident determine the distinct
random effect variance parameters. Two random effect realizations
that have the same value in ident are constrained to have the
same variance. When fitting with a formula, ident is
constructed internally (each element of vc_formulas yields a
distinct label in ident).