Can anyone please explain this code in bvar giving the variance covariance matrix for the multivariate normal proposals? For the alpha parameter with bounds 1 to 3, for example, why should the J term be larger for values near 1 than for values near 3?
H <- diag(length(opt[["par"]])) * mh[["scale_hess"]]
J <- unlist(lapply(names(hyper), function(name) {
exp(opt[["par"]][[name]])/(1 + exp(opt[["par"]][[name]]))^2 *
(priors[[name]][["max"]] - priors[[name]][["min"]])
}))
...
if (hyper_n != 1) {
J <- diag(J)
}
HH <- J %% H %% t(J)
Many thanks
Neil