twocoin: Two-coin algorithm: implements the Portkey algorithm for beta...

Description Usage Arguments Value

View source: R/portkey.R

Description

Two-coin algorithm: implements the Portkey algorithm for beta = 1.

Usage

1
twocoin(prop, curr, pf, Cprop, Ccurr, ...)

Arguments

prop

The proposed value in the MCMC step

curr

The current value in the MCMC step

pf

A function that produces a Bern(p) realization, with argument value for the state of the Markov chain

Cprop

Upper bound for the target density at proposed value

Ccurr

Upper bound for the target density current value

...

additional arguments that go into pf

Value

a variable x which is either curr or prop and integer loops that returns the number of loops the Bernoulli factory took


dvats/portkey documentation built on Oct. 16, 2020, 12:40 a.m.