MAVB {vglmer}R Documentation

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)

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.

Value

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

References

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


[Package vglmer version 1.0.3 Index]