simulate-mixedDiffusion-method: Simulation of hierarchical (mixed) diffusion model

Description Usage Arguments Examples

Description

Simulation of the stochastic process model dY_t = b(φ_j,t,Y_t)dt + γ \widetilde{s}(t,Y_t)dW_t, φ_j~N(μ, Ω).

Usage

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

Arguments

object

class object of parameters: "mixedDiffusion"

nsim

number of data sets to simulate. Default is 1.

seed

optional: seed number for random number generator

t

vector of time points

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
4
5
6
mu <- 2; Omega <- 0.4; phi <- matrix(rnorm(21, mu, sqrt(Omega)))
model <- set.to.class("mixedDiffusion", y0.fun = function(phi, t) 0.5,
  parameter = list(phi = phi, mu = mu, Omega = Omega, gamma2 = 0.1),
  b.fun = function(phi, t, x) phi*x, sT.fun = function(t, x) x)
t <- seq(0, 1, by = 0.01)
data <- simulate(model, t = t, plot.series = TRUE)

SimoneHermann/BaPreStoPro documentation built on May 10, 2017, 1:42 p.m.