posterior.GaussianNIG: Update a "GaussianNIG" object with sample sufficient statistics
Description
For the model structure:
beta,sigma^2|gamma ~ NIG(gamma)
x|beta,sigma^2,X ~ Gaussian(X
where gamma = (m,V,a,b) is the Normal-Inverse-Gamma(NIG) parameter, "m" is a numeric "location" parameter; "V" is a symmetric positive definite matrix representing the "scale" parameters; "a" and "b" are the "shape" and "rate" parameter of the Inverse Gamma distribution.
The model structure and prior parameters are stored in a "GaussianNIG" object.
Update gamma by adding the information of newly observed samples (x,X). The model structure and prior parameters are stored in a "GaussianNIG" object, the prior parameters in this object will be updated after running this function.
Usage
# S3 method for GaussianNIG
posterior(obj, ss, w = NULL, ...)
Arguments
obj
A "GaussianNIG" object.
ss
Sufficient statistics of (x,X). In Gaussian-NIG case the sufficient statistic of sample (x,X) is a object of type "ssGaussianLinear", it can be generated by the function sufficientStatistics().
w
Sample weights, default NULL.
...
Additional arguments to be passed to other inherited types.
Value
None. the gamma stored in "obj" will be updated based on "ss".
References
Banerjee, Sudipto. "Bayesian Linear Model: Gory Details." Dowloaded from http://www. biostat. umn. edu/~ ph7440 (2008).