fptsde3d: Approximate densities and random generation for first passage...

View source: R/ftpsde.R

fptsde3dR Documentation

Approximate densities and random generation for first passage time in 3-D SDE's

Description

Kernel density and random generation for first-passage-time (f.p.t) in 3-dim stochastic differential equations.

Usage

fptsde3d(object, ...)
dfptsde3d(object, ...)

## Default S3 method:
fptsde3d(object, boundary, ...)
## S3 method for class 'fptsde3d'
summary(object, digits=NULL, ...)
## S3 method for class 'fptsde3d'
mean(x, ...)
## S3 method for class 'fptsde3d'
Median(x, ...)
## S3 method for class 'fptsde3d'
Mode(x, ...)
## S3 method for class 'fptsde3d'
quantile(x, ...)
## S3 method for class 'fptsde3d'
kurtosis(x, ...)
## S3 method for class 'fptsde3d'
skewness(x, ...)
## S3 method for class 'fptsde3d'
min(x, ...)
## S3 method for class 'fptsde3d'
max(x, ...)
## S3 method for class 'fptsde3d'
moment(x, ...)
## S3 method for class 'fptsde3d'
cv(x, ...)

## Default S3 method:
dfptsde3d(object, pdf=c("Joint","Marginal"), ...)
## S3 method for class 'dfptsde3d'
plot(x,display="rgl",hist=FALSE, ...)						   

Arguments

object

an object inheriting from class snssde3d for fptsde3d, and fptsde3d for dfptsde3d.

boundary

an expression of a constant or time-dependent boundary.

pdf

probability density function Joint or Marginal.

x

an object inheriting from class dfptsde3d.

digits

integer, used for number formatting.

display

display plots.

hist

if hist=TRUE plot histogram. Based on truehist function.

...

potentially arguments to be passed to methods, such as density for marginal density and sm.density for joint density.

Details

The function fptsde3d returns a random variable (\tau_{(X(t),S(t))},\tau_{(Y(t),S(t))},\tau_{(Z(t),S(t))}) "first passage time", is defined as :

\tau_{(X(t),S(t))} = \{ t \geq 0 ; X_{t} \geq S(t) \},\quad if \quad X(t_{0}) < S(t_{0})

\tau_{(Y(t),S(t))} = \{ t \geq 0 ; Y_{t} \geq S(t) \},\quad if \quad Y(t_{0}) < S(t_{0})

\tau_{(Z(t),S(t))} = \{ t \geq 0 ; Z_{t} \geq S(t) \},\quad if \quad Z(t_{0}) < S(t_{0})

and:

\tau_{(X(t),S(t))} = \{ t \geq 0 ; X_{t} \leq S(t) \},\quad if \quad X(t_{0}) > S(t_{0})

\tau_{(Y(t),S(t))} = \{ t \geq 0 ; Y_{t} \leq S(t) \},\quad if \quad Y(t_{0}) > S(t_{0})

\tau_{(Z(t),S(t))} = \{ t \geq 0 ; Z_{t} \leq S(t) \},\quad if \quad Z(t_{0}) > S(t_{0})

fig11

And dfptsde3d returns a marginal kernel density approximation for (\tau_{(X(t),S(t))},\tau_{(Y(t),S(t))},\tau_{(Z(t),S(t))}) "first passage time". with S(t) is through a continuous boundary (barrier).

fig12

An overview of this package, see browseVignettes('Sim.DiffProc') for more informations.

Value

dfptsde3d()

gives the marginal kernel density approximation for fpt.

fptsde3d()

generates random of fpt.

Author(s)

A.C. Guidoum, K. Boukhetala.

References

Argyrakisa, P. and G.H. Weiss (2006). A first-passage time problem for many random walkers. Physica A. 363, 343–347.

Aytug H., G. J. Koehler (2000). New stopping criterion for genetic algorithms. European Journal of Operational Research, 126, 662–674.

Boukhetala, K. (1996) Modelling and simulation of a dispersion pollutant with attractive centre. ed by Computational Mechanics Publications, Southampton ,U.K and Computational Mechanics Inc, Boston, USA, 245–252.

Boukhetala, K. (1998a). Estimation of the first passage time distribution for a simulated diffusion process. Maghreb Math.Rev, 7(1), 1–25.

Boukhetala, K. (1998b). Kernel density of the exit time in a simulated diffusion. les Annales Maghrebines De L ingenieur, 12, 587–589.

Ding, M. and G. Rangarajan. (2004). First Passage Time Problem: A Fokker-Planck Approach. New Directions in Statistical Physics. ed by L. T. Wille. Springer. 31–46.

Roman, R.P., Serrano, J. J., Torres, F. (2008). First-passage-time location function: Application to determine first-passage-time densities in diffusion processes. Computational Statistics and Data Analysis. 52, 4132–4146.

Roman, R.P., Serrano, J. J., Torres, F. (2012). An R package for an efficient approximation of first-passage-time densities for diffusion processes based on the FPTL function. Applied Mathematics and Computation, 218, 8408–8428.

Gardiner, C. W. (1997). Handbook of Stochastic Methods. Springer-Verlag, New York.

See Also

fptsde1d for simulation fpt in sde 1-dim. fptsde2d for simulation fpt in sde 2-dim.

FPTL for computes values of the first passage time location (FPTL) function, and Approx.fpt.density for approximate first-passage-time (f.p.t.) density in package "fptdApprox".

GQD.TIpassage for compute the First Passage Time Density of a GQD With Time Inhomogeneous Coefficients in package "DiffusionRgqd".

Examples


## dX(t) = 4*(-1-X(t))*Y(t) dt + 0.2 * dW1(t) 
## dY(t) = 4*(1-Y(t)) *X(t) dt + 0.2 * dW2(t) 
## dZ(t) = 4*(1-Z(t)) *Y(t) dt + 0.2 * dW3(t) 
## x0 = 0, y0 = -2, z0 = 0, and barrier -3+5*t.       
## W1(t), W2(t) and W3(t) three independent Brownian motion      
set.seed(1234)

# SDE's 3d

fx <- expression(4*(-1-x)*y, 4*(1-y)*x, 4*(1-z)*y)
gx <- rep(expression(0.2),3)
mod3d <- snssde3d(drift=fx,diffusion=gx,M=500)

# boundary 
St <- expression(-3+5*t)

# random

out <- fptsde3d(mod3d,boundary=St)
out
summary(out)

# Marginal density

denM <- dfptsde3d(out,pdf="M")
denM
plot(denM)

# Multiple isosurfaces
## Not run: 
denJ <- dfptsde3d(out,pdf="J")
denJ
plot(denJ,display="rgl")

## End(Not run)

Sim.DiffProc documentation built on May 29, 2024, 8:09 a.m.