Learn R Programming

bbricks (version 0.1.1)

sufficientStatistics_Weighted: Get weighted sample sufficient statistics

Description

This is a generic function that will generate the weighted sufficient statistics of a given "BayesianBrick" object. That is, for the model structure: theta|gamma ~ H(gamma) X|theta ~ F(theta) get the weighted sufficient statistics T(X)

Usage

sufficientStatistics_Weighted(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_Weighted.GaussianNIW for Gaussian-NIW conjugate structure, sufficientStatistics_Weighted.GaussianNIG for Gaussian-NIG conjugate structure, sufficientStatistics_Weighted.CatDirichlet for Categorical-Dirichlet conjugate structure, sufficientStatistics_Weighted.CatDP for Categorical-DP conjugate structure ...

Examples

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

Run the code above in your browser using DataLab