estimate-jumpDiffusion-method: Estimation for jump diffusion process

Description Usage Arguments Proposal densities Examples

Description

Bayesian estimation of a stochastic process dY_t = b(φ,t,Y_t)dt + s(γ^2,t,Y_t)dW_t + h(θ,t,Y_t)dN_t.

Usage

1
2
3
## S4 method for signature 'jumpDiffusion'
estimate(model.class, t, data, nMCMC, propSd,
  adapt = TRUE, proposal = c("normal", "lognormal"), it.xi = 5)

Arguments

model.class

class of the jump diffusion model including all required information, see jumpDiffusion-class

t

vector of time points

data

vector of observation variables

nMCMC

length of Markov chain

propSd

vector of proposal variances for (φ, θ, γ^2, ξ)

adapt

if TRUE (default), proposal variance is adapted

proposal

proposal density for phi, theta: "normal" (default) or "lognormal" (for positive parameters), see description below

it.xi

number of iterations for MH step for ξ inside the Gibbs sampler

Proposal densities

For γ^2, always the lognormal density is taken, since the parameter is always positive. For θ and φ, there is the possibility to choose "normal" or "lognormal" (for both together). The proposal density for ξ depends on the starting value of ξ. If all components are positive, the proposal density is lognormal, and normal otherwise.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# non-informative
model <- set.to.class("jumpDiffusion", Lambda = function(t, xi) (t/xi[2])^xi[1],
               parameter = list(theta = 0.1, phi = 0.05, gamma2 = 0.1, xi = c(3, 1/4)))
t <- seq(0, 1, by = 0.01)
data <- simulate(model, t = t, y0 = 0.5, plot.series = TRUE)
est <- estimate(model, t, data, 1000)
plot(est)

# informative
model <- set.to.class("jumpDiffusion", Lambda = function(t, xi) (t/xi[2])^xi[1],
   parameter = list(theta = 0.1, phi = 0.05, gamma2 = 0.1, xi = c(3, 1/4)),
   priorDensity = list(phi = function(phi) dnorm(phi, 0.05, 0.01),
                       theta = function(theta) dgamma(1/theta, 10, 0.1*9),
                       gamma2 = function(gamma2) dgamma(1/gamma2, 10, 0.1*9),
                       xi = function(xi) dnorm(xi, c(3, 1/4), c(1,1))))
t <- seq(0, 1, by = 0.01)
data <- simulate(model, t = t, y0 = 0.5, plot.series = TRUE)
est <- estimate(model, t, data, 1000)
plot(est)

## Not run: 
est_hidden <- estimate(model, t, data$Y, 1000)
plot(est_hidden)

## End(Not run)

SimoneHermann/BaPreStoPro documentation built on May 9, 2019, 1:46 p.m.