multi_layered_brownian_bridge: Multi-dimensional Layered Brownian Bridge sampler

View source: R/RcppExports.R

multi_layered_brownian_bridgeR Documentation

Multi-dimensional Layered Brownian Bridge sampler

Description

Simulation of a multi-dimensional layered Brownian Bridge given Bessel layers at user-specified times

Usage

multi_layered_brownian_bridge(dim, x, y, s, t, bessel_layers, times)

Arguments

dim

dimension of Brownian bridge

x

start value of Brownian bridge

y

end value of Brownian bridge

s

start time of Brownian bridge

t

end time of Brownian bridge

bessel_layers

a list of length dim where list[i] is the Bessel layer for component i

times

vector of real numbers to simulate Bessel bridge

Value

A list with the following components

full_path

Matrix of the simulated layered Brownian bridge path at all included time points, i.e. s, t and times. The times are sorted and duplicates are removed. The first dim rows are the points of the Brownian bridge in each component, last row gives the corresponding times

simulated_path

Matrix of the simulated layered Brownian bridge path only at the specified times passed into the function, i.e. the times vector. The times are not sorted and duplicates are not removed. The first dim rows are the points of the layered Brownian bridge in each component, last row gives the corresponding times

Examples

# simulate Bessel layer for two-dimensional Brownian bridge starting 
# and ending at (0,0) in time [0,1]
bes_layers <- multi_bessel_layer_simulation(dim = 2,
                                            x = c(0, 0),
                                            y = c(0, 0),
                                            s = 0,
                                            t = 1,
                                            mult = 0.5)
# simulate two-dimensional Brownian bridge starting 
# and ending at (0,0) in time [0,1]
multi_layered_brownian_bridge(dim = 2,
                              x = c(0,0),
                              y = c(0,0),
                              s = 0,
                              t = 1,
                              bessel_layers = bes_layers,
                              times = c(0.2, 0.4, 0.6, 0.8))

# note that simulated_path does not remove duplicates passed into times
multi_layered_brownian_bridge(dim = 2,
                              x = c(0,0),
                              y = c(0,0),
                              s = 0,
                              t = 1,
                              bessel_layers = bes_layers,
                              times = c(0.2, 0.4, 0.6, 0.8, 0.4, 0.6))

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