max_sampler | R Documentation |
Simulation of a maximum point of a Brownian bridge
max_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 maximum point (max(x,y) <= low_bound < up_bound) |
up_bound |
Upper bound of maximum point (max(x,y) <= low_bound < up_bound) |
checks |
logical value to determine if arguments that are passed into the function are checked. Things that are checked include that max(x,y) <= low_bound < up_bound and that s < t |
vector: the simulated maximum, 'max', and time where maximum occurs, 'tau'
# simulate a maximum between 0 and 1 of a Brownian bridge starting at # 0 and ending at 0 in time [0,1] max_sampler(x = 0, y = 0, s = 0, t = 1, low_bound = 0, up_bound = 1) # plotting multiple simulated maximums and their times maximums <- sapply(1:5000, function(i) { max_sampler(x = 0, y = 0, s = 0, t = 1, low_bound = 0 , up_bound = 10) }) plot(x = maximums[2,], y = maximums[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.