couple_condbern_kernel: a coupling kernel that leaves conditional-bernoullis...

Description Usage Arguments Value

View source: R/couple_condbern_kernel.R

Description

discription of the algorithm in page 21 of Jacob et al. (2017). for one chain, it samples index of a 0 entry in X uniformly and index of a 1 entry uniformly it proposes a switch of the 1 and 0 and accepts the swap with probability ratio p(proposal) / p(current)

Usage

1
couple_condbern_kernel(xx1, xx2, sum_x1, sum_x2, alpha1, alpha2)

Arguments

xx1

current state of chain1

xx2

current state of chain2

sum_x1

sum of xx1

sum_x2

sum of xx2

alpha1

vector of probabilities for chain1

alpha2

vector of probabilities for chain2

Value

a matrix row 1 is new xx1 and row 2 is new xx2


nianqiaoju/agents documentation built on Feb. 19, 2021, 12:18 a.m.