# statsmodels.genmod.bayes_mixed_glm.BinomialBayesMixedGLM.fit_vb¶

BinomialBayesMixedGLM.fit_vb(mean=None, sd=None, fit_method='BFGS', minim_opts=None, scale_fe=False, verbose=False)

Fit a model using the variational Bayes mean field approximation.

Parameters
meanarray_like

Starting value for VB mean vector

sdarray_like

Starting value for VB standard deviation vector

fit_methodstr

Algorithm for scipy.minimize

minim_optsdict

Options passed to scipy.minimize

scale_febool

If true, the columns of the fixed effects design matrix are centered and scaled to unit variance before fitting the model. The results are back-transformed so that the results are presented on the original scale.

verbosebool

If True, print the gradient norm to the screen each time it is calculated.

Notes

The goal is to find a factored Gaussian approximation q1*q2*… to the posterior distribution, approximately minimizing the KL divergence from the factored approximation to the actual posterior. The KL divergence, or ELBO function has the form

E* log p(y, fe, vcp, vc) - E* log q

where E* is expectation with respect to the product of qj.

References

Blei, Kucukelbir, McAuliffe (2017). Variational Inference: A review for Statisticians https://arxiv.org/pdf/1601.00670.pdf