Learn R Programming

vglmer (version 1.0.5)

MAVB: Perform MAVB after fitting vglmer

Description

Given a model estimated using vglmer, this function performs marginally augmented variational Bayes (MAVB) to improve the approximation quality.

Usage

MAVB(object, samples, verbose = FALSE, var_px = Inf)

Value

This function returns a matrix with samples rows and columns for each fixed and random effect.

Arguments

object

Model fit using vglmer.

samples

Number of samples to draw.

verbose

Show progress in drawing samples.

var_px

Variance of working prior for marginal augmentation. Default (Inf) is a flat, improper, prior.

Details

This function returns the improved estimates of the parameters. To use MAVB when generating predictions, one should use predict_MAVB. At present, MAVB is only enabled for binomial models.

References

Goplerud, Max. 2022a. "Fast and Accurate Estimation of Non-Nested Binomial Hierarchical Models Using Variational Inference." Bayesian Analysis. 17(2): 623-650.