BiMOL.passage: Approximate the First Passage Time Density of a Four-Barrier...

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

Description

BiMOL.passage() approximates a solution to partial differential equation (PDE) that governs the evolution of the survaval distribution of the first passage time density of a bivariate diffusion passing through fixed thresholds limits[1] or limits[2] in the X-dimension and limits[3] or limits[4] in the Y-dimension.

Usage

1
2
BiMOL.passage(Xs, Ys, t, limits, N, delt, mu1, mu2, sig11, sig12, 
              sig21, sig22, desc = 1, Phi, plt = FALSE)

Arguments

Xs

Starting/Initial X-coordinate for the diffusion process (see note [1]).

Ys

Starting/Initial Y-coordinate for the diffusion process (see note [1]).

t

Value (>0) giving the terminal point for the transition horizon (the final time at which to evaluate the transition density).

limits

Limits for the spatial nodes of the lattice. These limits now represent the limits in the spatial domain (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]).

mu1

Optional (if drift and diffusion coefficients are already defined) arguments giving the drift and diffusion coefficients as text expressions (See Interface below).

mu2

Optional (if drift and diffusion coefficients are already defined) arguments giving the drift and diffusion coefficients as text expressions (See Interface below).

sig11

Optional (if drift and diffusion coefficients are already defined) arguments giving the drift and diffusion coefficients as text expressions (See Interface below).

sig12

Optional (if drift and diffusion coefficients are already defined) arguments giving the drift and diffusion coefficients as text expressions (See Interface below).

sig21

Optional (if drift and diffusion coefficients are already defined) arguments giving the drift and diffusion coefficients as text expressions (See Interface below).

sig22

Optional (if drift and diffusion coefficients are already defined) arguments giving the drift and diffusion coefficients as text expressions (See Interface below).

desc

The type of discretization used (see note [5]).

Phi

An optional indicator function for defining non-trivial boundary shapes (See vignettes).

plt

Should a plot be made (for dev purposes).

Value

surface

An array giving the approximate survival probability volume for all starting values contained in the discretization of the polygon enclosed by the limits.

density

A vector containing the approximate first passage time density for trajectories starting at (Xs,Ys) (see note [i]).

time

A vector of time nodes at which the approximation was evaluated.

Interface

BiMOL.passage uses a function-input interface whereby the drift and diffusion components of the time-homogeneous bivariate stochastic differential equation (SDE):

dX_t = mu_1(X_t,Y_t)dt+sigma_1(X_t,Y_t)dW_t^1

dY_t = mu_2(X_t,Y_t)dt+sigma_2(X_t,Y_t)dW_t^2,

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

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

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

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

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

further analysis may be conducted by calling the function BiMOL.passage().

Warnings

Warning [1]:

Note

Note [1]: If the initial value Xs does not fall on one of the lattice nodes, then the first passage time density is calculated by linearly interpolating between approximations at the two nearest lattice nodes.

Note [2]: Note that that enough nodes, N, are needed in order to generate a sufficiently accurate approximation, especially when limits[1] and limits[2] are far apart.

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]).

Note [5]: When one of the limits is sufficiently far away to not be accessible within the provided time-horizon, instabilities may occur and an alternative discretization may be required in order to ensure smooth operation. Possible values are desc = 1 (close limits), desc = 2 (limits[1] is inaccessible) and desc = 3 (limits[2] is inaccessible).

Author(s)

Etienne A.D. Pienaar etiennead@gmail.com

References

Hamdi, S., Schiesser, W. E. and Griffiths, G. W. 2007 Method of lines. Scholarpedia, 2(7):2859. Revision #124335.

Feagin, T. 2007 A tenth-order Runge-Kutta method with error estimate. In Proceedings of the IAENG Conf. on Scientifc Computing.

See Also

MOL.passage, BiMOL.density.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
 

#===============================================================================

 # For detailed notes and examples on how to use the BiMOL.passage() function, see
 # the following vignette:

 RShowDoc('Part_3_First_Passage_Times',type='html','DiffusionRimp')

#===============================================================================

DiffusionRimp documentation built on May 2, 2019, 2 p.m.