[IrisToolbox] for Macroeconomic Modeling
Adaptive Random-Walk Metropolis (ARWM) Posterior Simulator
jaromir.benes@iris-toolbox.com
Initialization
Initial vector of parameters \(\theta_0\) poster.InitParam
Initial proposal covariance matrix \(\Sigma_0\) poster.InitProposalCov
Initial scale \(\sigma_0\) poster.InitScale=1/3
Factorize \(\Sigma_0 = P_0 P_0'\)
Burn-in
Run a total \(N_\mathrm{burn} + N\)
Return \(N\)
Discard \(N_\mathrm{burn}\)
Parameter | Range | IrisT default |
---|---|---|
\(N_\mathrm{burn}\) | \((0, 1)\) | burnIn=0.10 |
Next proposal
Acceptance or rejection
Accept \(\hat \theta_n\) with probability \(\alpha_n\)
If accepted (\(a_n=1\)): \(\theta_n = \hat \theta_n\)
If rejected (\(a_n=0\)): \(\theta_n = \theta_{n-1}\)
Adaptation to target acceptance ratio
Adapt the scale and shape of the proposal covariance matrix to force acceptance ratio towards target \(\alpha^*\)
Adaptation
Parameter | Range | IrisT default |
---|---|---|
\(\gamma\) | \((0.5, 1)\) | gamma=0.8 |
\(\overline n_\mathrm{adapt}\) | \(\{2, 3, 4, \dots\}\) | lastAdapt=Inf |
Adaptation needs to be vanishing to preserve ergodicity
Scale adaptation
For \(n \le \overline n_\mathrm{adapt}:\)
Parameter | Range | IrisT default |
---|---|---|
\(\kappa_\mathrm{scale}\) | \((0, \infty)\) | adaptScale=1 |
Shape adaptation
For \(n \le \overline n_\mathrm{adapt}\):
Parameter | Range | IrisT default |
---|---|---|
\(\kappa_\mathrm{shape}\) | \((0, \infty)\) | adaptShape=0.5 |
Output arguments for diagnostics
Chain of log posteriors \(\mathit{poster}\left(\theta_n\right)\)
Cumulative acceptance ratio \(\textstyle\sum_{k=1}^{n} a_k /n\)
Chain of scale factors \(\sigma_n\)
Final proposal covariance matrix \(\Sigma_N\)