6. Result | trace plot 6
This chain seems good.
Should I set initial values
around (b, s_y)=(24, 0.3) ?
7. By the way
A contour map of log-posterior can be visualized.
Because the number of parameters is just two in this model.
7
For later explanation, I visualized
𝐸
𝑇
(≈ − log-posterior )
𝐸: Energy, 𝑇: Temperature
higher log-posterior lower
𝐸
𝑇
previous model is correspond to 𝑇 = 1
16. Pseudo Code 16
set T of replicas: T = (1, T2, T3, ..., TN_replica)
set initial values: x = (x0, x0, ..., x0)
for e in 1, ..., N_exchange
for r in 1, ..., N_replica
short sampling started from x[r] at each T[r]
end
save MCMC samples at T = 1
exchange replicas if p < unif(0,1)
for r in 1, ..., N_replica
update x[r]
end
end
23. Discussion
• Can I re-use warmup result in Stan?
i.e. step size &
diagonal elements of inverse mass matrix
• How to set iter and warmup of each short
sampling?
warmup=50 is usually too short as total sampling.
But, total warmup is 50*100 in this case.
Does it make sense?
23