A proper probability distribution is a probability distribution that
integrates to one, and an improper probability distribution does not
integrate to one. If a probability distribution integrates to any
positive and finite value other than one, then it is an improper
distribution, but is merely unnormalized. An unnormalized distribution
may be multiplied by a constant so that it integrates to one.
In Bayesian inference, the posterior probability distribution should
be proper. An improper prior distribution can cause an improper
posterior distribution. When the posterior distribution is improper,
inferences are invalid, it is non-integrable, and Bayes factors cannot
be used (though there are exceptions).
To avoid these problems, it is suggested that the prior probability
distribution should be proper, though it is possible to use an
improper prior distribution and have it result in a proper posterior
distribution.
To check the propriety of a univariate prior probability distribution,
create a function f
. For example, to check the propriety of a
vague normal distribution, such as
$$\theta \sim \mathcal{N}(0,1000)$$
the function is function(x){dnormv(x,0,1000)}
. Next, set the
lower and upper limits of integration, a
and
b
. Internally, this function calls integrate
from base
R, which uses adaptive quadrature. By using \(f(x)\) as shorthand
for the specified function, is.proper
will check to see if the
area of the following integral is one:
$$\int^b_a f(x)dx$$
Multivariate prior probability distributions currently cannot be
checked for approximate propriety. This is currently unavailable in
this package.
To check the propriety of the joint posterior distribution, the only
argument to be supplied is an object of class demonoid
,
iterquad
, laplace
, pmc
, or vb
. The
is.proper
function checks the logarithm of the marginal
likelihood (see LML
) for a finite value, and returns
TRUE
when the LML is finite. This indicates that the marginal
likelihood is finite for all observed \(\textbf{y}\) in the model
data set. This implies:
$$\int p(\theta|\textbf{y})p(\theta)d\theta < \infty$$
If the object is of class demonoid
and the algorithm was
adaptive, or if the object is of class iterquad
,
laplace
, or vb
and the algorithm did not converge, then
is.proper
will return FALSE
because LML was not
estimated. In this case, it is possible for the joint posterior to be
proper, but is.proper
will be unable to determine propriety
without the estimate of LML. If desired, the LML
may be
estimated by the user, and if it is finite, then the joint posterior
distribution is proper.