synchronous4_hmc_coupling: Syncronous coupling of four HMC proposals

Description Usage Arguments Value

View source: R/synchronous4_hmc_coupling.R

Description

Sampling of common momentum for all four particles and leapfrog integration

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
synchronous4_hmc_coupling(
  level,
  chain_state_coarse1,
  chain_state_coarse2,
  chain_state_fine1,
  chain_state_fine2,
  identical_coarse,
  identical_fine,
  tuning_coarse,
  tuning_fine
)

Arguments

level

an integer number that determines probability distribution in the multi-level approach

chain_state_coarse1

a vector with the position of the first particle at the coarse level (level - 1)

chain_state_coarse2

a vector with the position of the second particle at the coarse level (level - 1)

chain_state_fine1

a vector with the position of the first particle at the fine level (level)

chain_state_fine2

a vector with the position of the second particle at the fine level (level)

identical_coarse

a boolean variable takes the value True if two chains at the coarse level coincide and False otherwise

identical_fine

a boolean variable takes the value True if two chains at the fine level coincide and False otherwise

tuning_coarse

a list that contains parameters required for leapfrog integration at the coarse level: stepsize and number os steps

tuning_fine

a list that contains parameters required for leapfrog integration at the fine level: stepsize and number os steps

Value

a list with updated values of states of the first and the second chain at the coarse level, updated values of states of the first and the second chain at the fine level, velocites of each of the particles at the coarse level, velocites of each of the particles at the fine level, initial velocity (random sample from normal distribution), updated value of the "identical_coarse" flag, updated value of the "identical_fine" flag and cost of computations


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