unbiased_expectation: Unbiased estimator for the value at level zero

Description Usage Arguments Value

View source: R/unbiased_expectation.R

Description

Generate two coupled chains and compute the estimator

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
unbiased_expectation(
  level,
  rinit,
  single_kernel,
  tuning,
  coupled_kernel,
  proposal_coupling,
  h = function(l, x) x,
  k = 0,
  m = 1,
  max_iterations = Inf
)

Arguments

level

an integer that determines the target probability distribution of two chains

rinit

function that is utilized for initialization of chains (for instance, samples from prior)

single_kernel

function that makes a single step through a specified MCMC kernel

tuning

a list of parameters reuired for MCMC iterations (for instance standard deviation for RWM)

coupled_kernel

function that makes a single step through a specified coupled MCMC kernel (for 2 chains)

proposal_coupling

function that generates proposal for a given input

h

function that represents quantity of interest. Depends on level and spatial argument.

k

an integer: lower bound for time-averaging

m

an integer: upper bound for time-averaging

max_iterations

iteration at which to stop the while loop (default to infinity)

Value

a list with the value of MCMC estimator without correction, value of Unbiased MCMC estimator, meeting time, value of iteration counter, flag that is "True" if chains have met before the iteration counter reached the value in max_iterations, cost of calculations


jeremyhengjm/UnbiasedMultilevel documentation built on Dec. 20, 2021, 11:03 p.m.