multi_brownian_bridge: Multi-dimensional Brownian Bridge path sampler

View source: R/RcppExports.R

multi_brownian_bridgeR Documentation

Multi-dimensional Brownian Bridge path sampler

Description

Simulation of a multi-dimensional Brownian Bridge, at given times

Usage

multi_brownian_bridge(dim, x, y, s, t, 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

times

vector of real numbers to simulate Brownian bridge

Value

A list with the following components

full_path

Matrix of the simulated 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 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 Brownian bridge in each component, last row gives the corresponding times

Examples

# simulate two-dimensional Brownian bridge starting and ending 
# at (0,0) in time [0,1]
multi_brownian_bridge(dim = 2,
                      x = c(0,0),
                      y = c(0,0),
                      s = 0,
                      t = 1,
                      times = c(0.1, 0.2, 0.4, 0.6, 0.8))
                      
# note that simulated_path does not remove duplicates passed into times
multi_brownian_bridge(dim = 2,
                      x = c(0,0),
                      y = c(0,0),
                      s = 0,
                      t = 1,
                      times = c(0.1, 0.2, 0.4, 0.6, 0.6, 0.8, 0.1))

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