normalgamma {lestat} | R Documentation |
A Normal-Gamma Distribution
Description
Creates an object representing a Normal-Gamma distribution. If (x,y)
has a Normal-Gamma
distribution, then the marginal distribution of y
is a Gamma distribution, and the conditional
distribution of x
given y
is normal.
Usage
normalgamma(mu, kappa, alpha, beta)
Arguments
mu |
The |
kappa |
The |
alpha |
The |
beta |
The |
Details
If (x,y)
has a Normal-Gamma distribution with parameters \mu
, \kappa
,
\alpha
, and \beta
, then the marginal distribution of y
has a Gamma
distribution with parameters \alpha
and \beta
, and conditionally on y
,
x
has a normal distribution with expectation \mu
and logged standard deviation
\kappa - log(y)/2
. The probability density is proportional to
f(x,y)=y^{\alpha-0.5}\exp(-y(\beta + e^{-2\kappa}(x-\mu)^2/2))
Value
A Normal-Gamma probability distribution.
Author(s)
Petter Mostad <mostad@chalmers.se>
See Also
gamma
, normal
, expgamma
, normalexpgamma
,
mnormal
, mnormalgamma
, mnormalexpgamma
Examples
plot(normalgamma(3,4,5,6))