Description Usage Arguments Note Examples
Density and random generation for the normal-gamma distribution with parameters b, c, g and h. Also contours and confidence regions.
1 2 3 4 5 | dnormgamma(mu, tau, b, c, g, h)
rnormgamma(n, b, c, g, h)
NGacontour(mu, tau, b, c, g, h, p = NULL, ...)
|
mu |
vector of quantities. |
tau |
vector of quantities. |
b |
mean. |
c |
must be strictly positive. |
g |
must be strictly positive. |
h |
must be strictly positive. |
n |
sample size. |
p |
probability. |
... |
arguments to be passed to the plot function when plotting contours. |
If (mu,tau)^T~NGa(b,c,g,h) then mu|tau~N(b,1/(c*tau)) and tau~Ga(g,h). Also mu~t_(2g)(b,h/(gc)).
1 2 3 4 5 6 | dnormgamma(1, 2, 1, 2, 5, 3)
rnormgamma(1, 1, 2, 5, 3)
mu=seq(2,4,len=1000)
tau=seq(0,30,len=1000)
NGacontour(mu,tau,3,1,4,0.35,0.95)
NGacontour(mu,tau,2.5,30,20,2,0.95,add=TRUE,lty=3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.