delta_coin: Delta coin flipper (Algorithm 28 in ST329)

View source: R/RcppExports.R

delta_coinR Documentation

Delta coin flipper (Algorithm 28 in ST329)

Description

Flips 'Delta coin'; uses the Cauchy sequence S^delta_k to determine whether or not the Brownian bridge with minimum, min, starting at x, ending at y, between [s,t] remains in interval [l,v]

Usage

delta_coin(u, k, x, y, s, t, min, v)

Arguments

u

simulated value from random U[0,1]

k

integer value starting index for calculating the intervals

x

start value of Brownian bridge

y

end value of Brownian bridge

s

start value of Brownian bridge

t

end value of Brownian bridge

min

minimum of Brownian bridge

v

upper bound of Brownian bridge

Value

boolean value: if T, accept probability that Brownian bridge with minimum, min, remains in [l,v], otherwise reject

Examples

delta_coin(u = runif(1, 0, 1),
           k = 0,
           x = 0.1,
           y = 0.4,
           s = 0,
           t = 1,
           min = -0.2,
           v = 1.5)
                     

rchan26/layeredBB documentation built on March 25, 2022, 3:44 a.m.