rprop.rwmh: Proposals for random walk Metropolis-Hastings

View source: R/mcmc.R

rprop.rwmhR Documentation

Proposals for random walk Metropolis-Hastings

Description

This function transforms a vector cur to an unconstrained scale based on lbound and ubound, then samples draws from a multivariate Gaussian vector with covariance matrix cov centered at the current (unconstrained) value. The function then returns a list containing the proposal on the unconstrained scale (trprop), on the original scale (prop) along with the log of the jacobian of the transformation (logjac).

Usage

rprop.rwmh(cur = NULL, trcur = NULL, cov, lbound = rep(-Inf,
  ncol(cov)), ubound = rep(Inf, ncol(cov)))

Arguments

cur

vector of current parameter on the original (constrained) scale

trcur

vector of current parameter values on the unconstrained scale

cov

covariance matrix of the proposal for the trcur scale

lbound

lower bounds for the parameters

ubound

upper bounds for the parameter

Value

a list with components prop, trprop and logjac


lbelzile/mgp documentation built on Aug. 5, 2023, 2:34 a.m.