|
Algorithm A1 The Metropolis-Hastings Markov chain Monte Carlo (MH-MCMC) algorithm |
-
1:
Input: Prior , stepsize , maximum number of iterations .
-
2:
Initialize:.
-
3:
for
do
-
4:
Propose:
-
5:
Acceptance Probability:
-
6:
-
7:
Draw .
-
8:
if
then
-
9:
Accept the proposal: .
-
10:
else
-
11:
Reject the proposoal: .
-
12:
end if
-
13:
end for
|