Chapter 4 Bayesian Computation (Monte Carlo Methods)



Yüklə 18.32 Kb.
tarix05.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.


  1. 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

.

  1. Indirect sampling

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

  1. important sampling

  2. rejection sampling

  3. 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,

.

  1. Markov chain Monte Carlo method

There are several Markov chain Monte Carlo methods. One of the commonly used methods is Metropolis-Hastings 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:

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

  2. Compute the odds ratio .

  3. 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ş:


Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©genderi.org 2017
rəhbərliyinə müraciət

    Ana səhifə