Learn R Programming

fdars (version 0.3.3)

r.bridge: Generate Brownian Bridge

Description

Simulate sample paths from a Brownian bridge, which is a Brownian motion conditioned to return to 0 at time 1.

Usage

r.bridge(n, t, sigma = 1, seed = NULL)

Value

An fdata object containing the simulated paths.

Arguments

n

Number of sample paths.

t

Evaluation points (should include 0 and 1 for standard bridge).

sigma

Volatility (default 1).

seed

Optional random seed.

Examples

Run this code
t <- seq(0, 1, length.out = 100)
bb_data <- r.bridge(n = 20, t = t)
plot(bb_data)

Run the code above in your browser using DataLab