min_sampler | R Documentation |
Simulation of a minimum point of a Brownian bridge
min_sampler(x, y, s, t, low_bound, up_bound, checks = TRUE)
x |
start value of Brownian bridge |
y |
end value of Brownian bridge |
s |
start time of Brownian bridge |
t |
end time of Brownian bridge |
low_bound |
Lower bound of minimum point (low_bound < up_bound <= min(x,y)) |
up_bound |
Upper bound of minimum point (low_bound < up_bound <= min(x,y)) |
checks |
logical value to determine if arguments that are passed into the function are checked. Things that are checked include that low_bound < up_bound <= min(x,y) and that s < t |
vector: the simulated minimum, 'min', and time where minimum occurs, 'tau'
# simulate a minimum between 0 and 1 of a Brownian bridge starting # at 0 and ending at 0 in time [0,1] min_sampler(x = 0, y = 0, s = 0, t = 1, low_bound = -1, up_bound = 0) # plotting multiple simulated minimums and their times minimums <- sapply(1:5000, function(i) { min_sampler(x = 0, y = 0, s = 0, t = 1, low_bound = -10, up_bound = 0) }) plot(x = minimums[2,], y = minimums[1,], pch = 20, lwd = 0.1, xlab = 'Time', ylab = 'X')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.