rtmc3: Simulate a Randomized Transformation based MC3 algorithm...

Description Usage Arguments Value

Description

The function simulates a MC3/RMC3 chain of length nsamples using the scale, base and burn in taken optimally as default or specified by user. beta_set is the set of inverse temperatures chosen using select_inverse_temp() function, either under fixed scheme (TMC3) or under randomized scheme (RTMC3)

Usage

1
2
rtmc3(target_pdf, beta_set, scale, base, nsamples, cycle = NULL,
  verb = TRUE, swap_adjacent = TRUE, burn_in = NULL)

Arguments

target_pdf

The log target density function from which the user wants to generate samples.

beta_set

The vector of inverse temperatures used (see select_inverse_temp() function to choose this vector appropriately).

scale

The proposal density scaling parameter. An approximation of the optimal scaling given the target_pdf is performed by OptimalScaling(). The default scale is this estimated optimal scaling

base

The starting value of the chain

nsamples

The number of samples to be drawn.

cycle

The number of iterations of TMCMC chaining that is followed by a swap, or gap between consecutive swaps. Default is nsamples *0.01, rounded to next integer.

verb

logical parameter, if TRUE the function prints the progress of simulation.

swap_adjacent

logical parameter, whether we allow for swaps between only consecutive inverse temperatures or any randomly chosen inverse temperatures pair. Default is TRUE.

burn_in

The number of samples assigned as burn-in period. The default burn-in is taken to be one-third of nsamples.

Value

Returns a list containing the following items

chain_set

A list of chains at different underlying inverse temperatures produced by the TMC3/RTMC3 algorithm.

post.mean

The estimated posterior mean for the principal chain (inverse temp=1) adjusting for burn-in.

@author Kushal K Dey

@useDynLib tmcmcR @export


kkdey/tmcmcR2 documentation built on May 20, 2019, 10:40 a.m.