Learn R Programming

bbricks (version 0.1.1)

posterior: update the prior distribution with sufficient statistics

Description

This is a generic function that will update the prior distribution of a "BayesianBrick" object by adding information of the observation's sufficient statistics. i.e. for the model structure: theta|gamma ~ H(gamma) X|theta ~ F(theta) update gamma to gamma_posterior by adding the information of X to gamma

Usage

posterior(obj, ...)

Arguments

obj

A "BayesianBrick" object used to select a method.

...

further arguments passed to or from other methods.

Value

None, or an error message if the update fails.

See Also

posterior.GaussianNIW for Gaussian-NIW conjugate structure, posterior.GaussianNIG for Gaussian-NIG conjugate structure, posterior.CatDirichlet for Categorical-Dirichlet conjugate structure, posterior.CatDP for Categorical-DP conjugate structure ...