Learn R Programming

bbricks (version 0.1.1)

sufficientStatistics: Get sample sufficient statistics

Description

This is a generic function that will generate the sufficient statistics of a given Bayesian bricks object. i.e. for the model structure: theta|gamma ~ H(gamma) X|theta ~ F(theta) get the sufficient statistics T(X)

Usage

sufficientStatistics(obj, ...)

Arguments

obj

A "BayesianBrick" object used to select a method.

...

further arguments passed to or from other methods.

Value

An object of corresponding sufficient statistics class, such as "ssGaussian"

See Also

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

Examples

Run this code
# NOT RUN {
x <- rGaussian(10,mu = 1,Sigma = 1)
obj <- GaussianNIW()                    #an GaussianNIW object
sufficientStatistics(obj=obj,x=x)
# }

Run the code above in your browser using DataLab