Description Usage Arguments Value References See Also Examples
View source: R/Gaussian_Inference.r
For following model structure:
x \sim Gaussian(mu,Sigma)
mu \sim Gaussian(m,S)
Where Sigma is known. Gaussian() is the Gaussian distribution. See ?dGaussian
for the definition of Gaussian distribution.
The sufficient statistics of a set of samples x (each row of x is a sample) and weights w are:
the effective number of samples N=sum(w)
the sample sum xsum = colSums(x*w)
1 2 | ## S3 method for class 'GaussianGaussian'
sufficientStatistics_Weighted(obj, x, w, foreach = FALSE, ...)
|
obj |
A "GaussianGaussian" object. |
x |
matrix, Gaussian samples, when x is a matrix, each row is a sample of dimension ncol(x). when x is a vector, x is length(x) samples of dimension 1. |
w |
numeric, sample weights. |
foreach |
logical, specifying whether to return the sufficient statistics for each observation. Default FALSE. |
... |
Additional arguments to be passed to other inherited types. |
If foreach=TRUE, will return a list of sufficient statistics for each row of x, otherwise will return the sufficient statistics of x as a whole.
Gelman, Andrew, et al. Bayesian data analysis. CRC press, 2013.
GaussianGaussian
, sufficientStatistics.GaussianGaussian
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.