
Chapter 4 Bayesian Computation (Monte Carlo Methods)

tarix  05.10.2018  ölçüsü  18,32 Kb. 

Chapter 4 Bayesian Computation (Monte Carlo Methods)
Let be the data observed and
,
be of interest. Sometimes, it might be very difficult to find the explicit form the above integral. In such cases, Monte Carlo method might be an alternative choice.

Direct sampling
The direct sampling is to generate from and then use
to estimate r. Note that N is usually large. The variance of is
.
Thus, the standard error of is
.
An approximate 95% confidence interval for r is
.
Further, the estimate of
is
.
The standard error of is
.

Indirect sampling
As can not be generated from the posterior directly, the following sampling methods can be used:

important sampling

rejection sampling

the weighted boostrap
(a) Important sampling
Since
where
and is a density which the data can be generated from easily and be in generally chosen to approximate the posterior density, i.e.,
.
is called importance function. can be estimated by
,
where
The accuracy of the important sampling can be estimated by plugging in and .
(b) Rejection sampling
Let be a density which the data can be generated from easily and be in generally chosen to approximate the posterior density. In addition, there is a finite known constant such that
,
for every . The steps for the rejection sampling are:
1. generate from .
2. generate independent of from .
3. If
accept ; otherwise reject .
4. Repeat steps 1~3 until the desired sample (accepted )
,
are obtained. Note that will be the data generated from the posterior density. Then,
.
Note:
Differentiation with respect to yield , the posterior density function evaluated at .
(c) Weighted boostrap
It is very similar to the important sampling method. The steps are as follows:
1. generate from .
2. draw from the discrete distribution over which put mass
,
at . Then,
.

Markov chain Monte Carlo method
There are several Markov chain Monte Carlo methods. One of the commonly used methods is MetropolisHastings algorithm. Let be generated from which is needed only up to proportionality constant. Given an auxiliary function such that is a probability density function and , the Metropolis algorithm is as follows:

Draw from the p.d.f. , where is the current state of the Markov chain.

Compute the odds ratio .

If , then .
If , then
4. Repeat steps 1~3 until the desired sample (accepted )
,
are obtained. Note that will be the data generated from the posterior density. Then,
.
Note:
For the Metropolis algorithm, under mild conditions, converge in distribution to the posterior density as .
Note:
is called the candidate or proposal density. The most commonly used is the multivariate normal distribution.
Note:
Hastings (1970) redefine
,
where is not necessarily symmetric.
Dostları ilə paylaş: 

