Skip to content

Todo: use optim Hessian for proposals (Question: Variance covariance matrix of proposal distribution) #94

@NeilDiamond

Description

@NeilDiamond

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions