Building of model classes

Description Usage Arguments Details Examples

View source: R/class_functions.R


Definition of the model classes.


4 = c("jumpDiffusion", "Merton", "Diffusion",
  "mixedDiffusion", "hiddenDiffusion", "hiddenmixedDiffusion", "jumpRegression",
  "NHPP", "Regression", "mixedRegression"), parameter, prior, start,,,,,, fun, Lambda, priorDensity)


name of model class


list of parameter values


optional list of prior parameters


optional list of starting values

drift function b

variance function s

jump high function h

variance function \widetilde{s}

function for the starting point, if dependent on parameter


regression function


intensity rate of Poisson process


list of functions for prior densities, if missing: non-informative estimation

Details is the central function to define a S4 model class, where the simulate and the estimate methods build up. Main input parameter is, which is one out of "jumpDiffusion", "Merton", "Diffusion", "mixedDiffusion", "hiddenDiffusion", "hiddenmixedDiffusion", "jumpRegression", "NHPP", "Regression" and "mixedRegression", which is the name of the class object containing all information of the model. If you write without any further input parameter, the function tells you which entries the list parameter has to contain. This is the second central input parameter. If input parameter start is missing, it is set to parameters. If input parameter prior, which is a list of prior parameters, is missing, they are calculated from parameter in that way, that prior mean and standard deviation is equal to the entries of parameter. Functions,, can be seen in the model definition of the jump diffusion dY_t = b(φ, t, Y_t)dt + s(γ^2, t, Y_t)dW_t + h(θ, t, Y_t)dN_t. In the case of a continuous diffusion, one out of "Diffusion", "mixedDiffusion", "hiddenDiffusion" or "hiddenmixedDiffusion", variance function s(γ^2, t, y) is restricted to the case s(γ^2, t, y)=γ\widetilde{s}(t, y). stands for \widetilde{s}(t, y). In the case of a regression model, "Regression" or "mixedRegression", means the variance function dependent on t of the regression error ε_i\sim N(0,σ^2\widetilde{s}(t)). In both cases, default value is = function(t, y) 1. is for the models, where the starting value depends on the parameter phi, "mixedDiffusion", "hiddenDiffusion" or "hiddenmixedDiffusion". Default value is a constant function in 1. fun is the regression function for the models "Regression", "mixedRegression" and "jumpRegression". In the first two cases, this is f(φ, t) and in the third f(t, N_t, θ). Function Lambda is the cumulative intensity function in the models including the non-homogeneous Poisson process. Input parameter priorDensity is for the model class jumpDiffusion-class a list of functions for the prior density functions. For the model classes NHPP-class and Merton-class, priorDensity is the density of the intensity rate parameter of the Poisson process. Default is a non-informative approach for all cases.


(names <-"jumpDiffusion"))
model <-"jumpDiffusion",
             parameter = list(theta = 0.1, phi = 0.01, gamma2 = 0.1, xi = 3))

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