gsbBayesUpdate | R Documentation |
Bayesian update from prior and data to posterior for normally distributed data with known sigma.
gsbBayesUpdate(alpha, beta, meanData, precisionData, with.alpha = TRUE)
alpha |
|
beta |
|
meanData |
|
precisionData |
|
with.alpha |
|
alpha |
posterior means. Only if |
beta |
posterior precisions. |
weight |
weights of the priors relative to the whole information after updating. |
This function is used in the function gsb()
.
Florian Gerber <florian.gerber@math.uzh.ch>, Thomas Gsponer
gsb
## One dimensional case, with.alpha = FALSE
gsbBayesUpdate(beta=10,precisionData=20, with.alpha=FALSE)
## Two dimensional case, with.alpha = TRUE
gsbBayesUpdate(alpha=c(5,6),beta=c(10,11),meanData=c(10,11),
precisionData=c(20,21),with.alpha=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.