MOL.aic: Calculate a Pseudo AIC Value for a Diffusion Model via the...

Description Usage Arguments Value Interface Warning Note Author(s) See Also Examples

Description

MOL.aic() approximates the likelihood function for a diffusion model under a given dataset and parameter vector.

Usage

1
MOL.aic(X, time, delt, xlims, N, theta, diff.type,plt = TRUE, wrt = FALSE)

Arguments

X

Vector of coordinates at which the diffusion process was observed, where N is the number of observations.

time

A vector of time nodes at which the process was observed.

xlims

Limits for the spatial nodes of the lattice. These limits should be wide enough for the transition density to be negligibly small at the endpoints (see note [2]).

N

The number of nodes in the spatial domain at which to evaluate the transitional density. Increase N for more accurate approximations (see note [3] and warning [2]).

delt

Step size for the time domain of the lattice (see note [4]).

theta

Parameter vector at which the AIC should be evaluated. Typically the parameter vector is calculated using RS.impute()

diff.type

An indicator assuming values 1, 2 or 3, for which of the predefined volatility structures to impose.

plt

Draw a plot of the calculation as it takes place.

wrt

Write a .cpp file. Useful for inspection purposes.

Value

AIC

An approximate AIC value.

likelihood

The approximate likelihood value used in the calculation.

p

The dimesnion of the parameter vector.

Interface

MOL.aic uses a function-input interface whereby the drift and diffusion components of the stochastic differential equation (SDE)

dX_t = mu(X_t, t)dt+sigma(X_t, t)dW_t,

are defined as R-functions in the current workspace. That is by defining the drift and diffusion components

mu=function(X,t){some expression i.t.o. X and t}

sig=function(X,t){some expression i.t.o. X and t}

further analysis may be conducted by calling the function MOL.aic().

Warning

Warning [1]: Note that if the lattice is shifted, degeneracies may occur for certain drift/volatility specifications if the shifted lattice moves into non-nonsensical values of the drift/volatility functions' domains.

Warning [2]: Although increasing the spatial resolution of the lattice by increasing N improves approximations, instabilities will occur if delt is not sufficiently small. This tends to manifest as jagged/spiked solutions that oscillate between positive and negative values.

Note

Note [1]: Although the spatial limits of the lattice is defined by the user using xlims, if the initial value Xs does not fall on one of the lattice nodes, then the lattice is shifted accordingly.

Note [2]: The approximation assumes that the entire density of the process falls on a finite interval. Thus the algorithm may breakdown for certain problems. Depending on the parameters of the process, the limits may be very far apart or near. Some experimentation may be required. Otherwise, set autofind = TRUE to find useful limits. Note also that larger N may be required for wider limits.

Note [3]: Increasing N will likely require smaller delt, thus increasing computation time. For some problems, slight increases in N will require much smaller delt.

Note [4]: delt is used as the step size for a 10(8)-th order Runge-Kutta method for solving the resulting system of ODEs. Note again the inter-play between N and delt (see note [3]).

Author(s)

Etienne A.D. Pienaar etiennead@gmail.com

See Also

RS.impute, BiMOL.aic.

Examples

1
#===============================================================================

eta21/DiffusionRimp documentation built on May 16, 2019, 8:54 a.m.