Learn R Programming

RBaM (version 1.1.1)

applyMetropolisRule: Metropolis Rule

Description

Application of Metropolis rule.

Usage

applyMetropolisRule(x, candid, fx, fcandid)

Value

A list with fields x (resulting sample), fx (resulting target) and move (did the chain move?).

Arguments

x

numeric vector, current sample.

candid

numeric vector, candidate sample.

fx

data frame, a 1-row data frame with fields logPosterior, logPrior and logLikelihood evaluated for the current sample.

fcandid

data frame, a 1-row data frame with fields logPosterior, logPrior and logLikelihood evaluated for the candidate sample.