preexplorationAMH: Pre exploration Adapative Metropolis-Hastings

Description Usage Arguments Details Value Author(s) See Also

View source: R/preexploration.R

Description

This function takes a target distribution, an integer representing the number of parallel chains, and an integer representing a number of iterations, and runs adaptive Metropolis-Hastings algorithm using them. The chains are then used to create a range called SuggestedRange, to be used to bin the state space according to the energy levels. The energy is here defined as minus the log density of the target distribution.

Usage

1
preexplorationAMH(target, nchains, niterations, proposal, verbose)

Arguments

target

Object of class "target": this argument describes the target distribution. See target for details.

nchains

Object of class "numeric": specifies the number of parallel chains.

niterations

Object of class "numeric": specifies the number of iterations.

proposal

Object of class "proposal": specifies the proposal distribution to be used to propose new values and to compute the acceptance rate. See the help of proposal. If this is not specified and the target is continuous, then the default is an adaptive gaussian random walk.

verbose

Object of class "logical": if TRUE (default) then prints some indication of progress in the console.

Details

The adaptive Metropolis-Hastings algorithm used in the function is described in more details in the help page of adaptiveMH

Value

The function returns a list holding the following entries:

LogEnergyRange

This holds the minimum and maximum energy values seen by the chains during the exploration.

LogEnergyQtile

Returns the first 10% quantile of the energy values seen by the chains during the exploration.

SuggestedRange

This holds the suggested range, that is, the first 10% quantile and the maximum value of the energy values seen during the exploration. This can be passed as the binrange argument of the binning class, see the trimodal example.

finalchains

The last point of each chain.

Author(s)

Luke Bornn <bornn@stat.harvard.edu>, Pierre E. Jacob <pierre.jacob.work@gmail.com>

See Also

adaptiveMH


PAWL documentation built on May 2, 2019, 5:58 a.m.