simulate-Diffusion-method: Simulation of diffusion process

Description Usage Arguments Examples

Description

Simulation of a stochastic process dY_t = b(φ,t,Y_t)dt + γ \widetilde{s}(t,Y_t)dW_t.

Usage

1
2
3
## S4 method for signature 'Diffusion'
simulate(object, nsim = 1, seed = NULL, t, y0,
  mw = 1, plot.series = TRUE)

Arguments

object

class object of parameters: "Diffusion"

nsim

number of trajectories to simulate. Default is 1.

seed

optional: seed number for random number generator

t

vector of time points

y0

starting point of the process

mw

mesh width for finer Euler approximation to simulate time-continuity

plot.series

logical(1), if TRUE, simulated series are depicted grafically

Examples

1
2
3
model <- set.to.class("Diffusion", parameter = list(phi = 0.5, gamma2 = 0.01))
t <- seq(0, 1, by = 0.01)
data <- simulate(model, t = t, y0 = 0.5, plot.series = TRUE)

Example output



BaPreStoPro documentation built on May 2, 2019, 3:34 p.m.