|
Algorithm 2 Replica Exchange Particle Marginal Metropolis–Hastings (REPMMH) Method. |
-
1:
initialize the parameters
-
2:
fordo
-
3:
for do
-
4:
draw the sample candidate of parameters
-
5:
calculate the marginal likelihood by using the SMC method according to Equation (13)
-
6:
calculate the acceptance probability with Equation (14)
-
7:
draw a uniform random number ( is a uniform distribution with range )
-
8:
if then
-
9:
set the sample of parameters
-
10:
else
-
11:
set the sample of parameters
-
12:
end if
-
13:
end for
-
14:
choose the replica number or for the exchange
-
15:
repeat
-
16:
calculate exchange probability with Equation (15) for replica numbers and
-
17:
draw a uniform random number
-
18:
if then
-
19:
exchange replicas
-
20:
end if
-
21:
set the replica number for the exchange
-
22:
until
-
23:
end for
-
24:
return
|