| likelihood | R Documentation |
Read and set the likelihood distribution corresponding to the conjugate prior distribution.
likelihood(mix)
likelihood(mix) <- value
mix |
Prior mixture distribution. |
value |
New likelihood. Should only be changed for Gamma priors as these are supported
with either Poisson ( |
If the prior and posterior distributions are in the same family, then the prior distribution is called a conjugate prior for the likelihood function.
| Prior/Posterior | Likelihood | Predictive | Summaries |
| Beta | Binomial | Beta-Binomial | n, r |
| Normal | Normal (fixed \sigma) | Normal | n, m, se |
| Gamma | Poisson | Gamma-Poisson | n, m |
| Gamma | Exponential | Gamma-Exp (not supported) | n, m
|
# Gamma mixture
gmix <- mixgamma(c(0.3, 20, 4), c(0.7, 50, 10))
# read out conjugate partner
likelihood(gmix)
ess(gmix)
# set conjugate partner
likelihood(gmix) <- "exp"
# ... which changes the interpretation of the mixture
ess(gmix)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.