rsamplers.rwmh is the constructor for the Random-walk Metropolis Hastings algorithm

The syntax is

obj = rsamplers.rwmh(target,x0,lb,ub)
obj = rsamplers.rwmh(target,x0,lb,ub,opts)
obj = rsamplers.rwmh(target,x0,lb,ub,opts,constraints)

INPUTS :

  • *target* : objective to MAXIMIZE

  • *x0* : vector of initial conditions

  • *lb* : lower bound

  • *ub* : upper bound

  • *opts* : options for the class. These include the properties from the superclass rsamplers.rsampler as well as the specific properties of the rwmh algorithm that can be found in the properties list below.

  • *constraints* (optional): - Matrix (n_constraints x 2) where each row [a, b] enforces x(a) <= x(b)

OUTPUT:

  • *obj* : object of class rsamplers.rwmh

OWN PROPERTIES AND DEFAULT VALUES:

  • *c* = 1 : cov scaling parameter

  • *tunedCov* : covariance matrix of the parameters

  • *proposal* = ‘normal’ : proposal in {‘normal’,’t-student’}

INHERITED PROPERTIES AND DEFAULT VALUES:

  • *nchain* = 1 : number of chains

  • *N* = 2000 : number of draws

  • *thinning* =1 : number of thinning draws

  • *burnin* = 0 : burnin sample

  • *MaxTime* = inf : Max Time

  • *MaxFunEvals* = inf :

See also

rsamplers.apt, rsamplers.imh, rsamplers.rsampler