SMetropolis {Umacs}R Documentation

Generate an SMetropolis object for the Umacs Sampler function

Description

Generates an object including the information necessary to generate an SMetropolis updating step for a parameter, within the main loop of an iterative sampler function.

The sampler is built using the Umacs function Sampler; and the arguments (update and init) are embedded in the sampler function.

See Sampler for further details.

Usage

SMetropolis(logpost = NULL, init, adapt.scale.function = "scaleAdapt.Metropolis", scale.jump = NA, class. = "SMetropolis")

Arguments

logpost An R function calculating the value (a scalar) of the unnormalized log-posterior function given all other arguments
init An R function that returns a (random) starting point (a scalar!) for a Markov chain for the parameter
adapt.scale.function name of the function used to adapt the proposal kernel (usually, just ignore and use the default)
scale.jump The scale of the proposal kernel matrix, if adaptation is not to be used
class. (for internal use only)

Details

SMetropolis is a special case of the Metropolis sampling scheme; it is optimized for scalar parameters.

SMetropolis is to be used only within the Sampler function call.

The arguments of the update and init functions are ignored. The body of the function can contain references to any parameters that are defined in the Sampler function call, or to any variables in an enclosing environment (such as the Global Environment).

The name of the parameter that is being updated is not specified here, but only within the Sampler function call.

Value

An object of class SMetropolis, to be further processed by the Umacs function Sampler.

Author(s)

Jouni Kerman <jouni@kerman.com>

References

Kerman, Jouni. Umacs: A Universal Markov Chain Sampler. Technical report, Columbia University, New York.

See Also

Umacs-package for an overview of the Umacs package.

Sampler for how to create a sampler function; see the vignette for details.

Package `rv'.


[Package Umacs version 0.924 Index]