delta_coin_intervals | R Documentation |
Flips 'Delta coin' for intervals; takes the product of the Cauchy sequence S^delta_k to determine whether or not the Brownian bridge with minimum, min, remains in the interval [l,v]
delta_coin_intervals(u, k, X, times, min, v)
u |
simulated value from random U[0,1] |
k |
integer value starting index for calculating the intervals |
X |
vector of values of Brownian bridge |
times |
vector of times |
min |
minimum of Brownian bridge |
v |
upper bound of Brownian bridge |
boolean value: if T, accept probability that Brownian bridge with minimum, min, remains in [min,v], otherwise reject
# setting up Brownian bridge variable brownian_bridge <- matrix(c(0, 0, -0.2, 0.4, 0.3, 0.5, 1, 1), ncol = 4, nrow = 2) # flip delta coin whether or not Brownian bridge remains in [-0.2, 1.5] d <- abs(1.5 - -0.2) k <- ceiling(sqrt(1 + d^2)/(2*d)) delta_coin_intervals(u = runif(1, 0, 1), k = k, X = brownian_bridge[1,], times = brownian_bridge[2,], min = -0.2, v = 1.5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.