fptsde2d | R Documentation |
Kernel density and random generation for first-passage-time (f.p.t) in 2-dim stochastic differential equations.
fptsde2d(object, ...)
dfptsde2d(object, ...)
## Default S3 method:
fptsde2d(object, boundary, ...)
## S3 method for class 'fptsde2d'
summary(object, digits=NULL, ...)
## S3 method for class 'fptsde2d'
mean(x, ...)
## S3 method for class 'fptsde2d'
Median(x, ...)
## S3 method for class 'fptsde2d'
Mode(x, ...)
## S3 method for class 'fptsde2d'
quantile(x, ...)
## S3 method for class 'fptsde2d'
kurtosis(x, ...)
## S3 method for class 'fptsde2d'
skewness(x, ...)
## S3 method for class 'fptsde2d'
min(x, ...)
## S3 method for class 'fptsde2d'
max(x, ...)
## S3 method for class 'fptsde2d'
moment(x, ...)
## S3 method for class 'fptsde2d'
cv(x, ...)
## Default S3 method:
dfptsde2d(object, pdf=c("Joint","Marginal"), ...)
## S3 method for class 'dfptsde2d'
plot(x,display=c("persp","rgl","image","contour"),
hist=FALSE, ...)
object |
an object inheriting from class |
boundary |
an |
pdf |
probability density function |
x |
an object inheriting from class |
digits |
integer, used for number formatting. |
display |
display plots. |
hist |
if |
... |
potentially further arguments for (non-default) methods. arguments to be passed to methods, such as |
The function fptsde1d
returns a random variable (\tau_{(X(t),S(t))},\tau_{(Y(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})
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})
And dfptsde2d
returns a kernel density approximation for (\tau_{(X(t),S(t))},\tau_{(Y(t),S(t))})
"first passage time".
with S(t)
is through a continuous boundary (barrier).
An overview of this package, see browseVignettes('Sim.DiffProc')
for more informations.
dfptsde2d() |
gives the kernel density approximation for fpt. |
fptsde2d() |
generates random of fpt. |
A.C. Guidoum, K. Boukhetala.
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.
fptsde1d
for simulation fpt in sde 1-dim. fptsde3d
for simulation fpt in sde 3-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".
## dX(t) = 5*(-1-Y(t))*X(t) * dt + 0.5 * dW1(t)
## dY(t) = 5*(-1-X(t))*Y(t) * dt + 0.5 * dW2(t)
## x0 = 2, y0 = -2, and barrier -3+5*t.
## W1(t) and W2(t) two independent Brownian motion
set.seed(1234)
# SDE's 2d
fx <- expression(5*(-1-y)*x , 5*(-1-x)*y)
gx <- expression(0.5 , 0.5)
mod2d <- snssde2d(drift=fx,diffusion=gx,x0=c(2,-2),M=100)
# boundary
St <- expression(-1+5*t)
# random fpt
out <- fptsde2d(mod2d,boundary=St)
out
summary(out)
# Marginal density
denM <- dfptsde2d(out,pdf="M")
denM
plot(denM)
# Joint density
denJ <- dfptsde2d(out,pdf="J",n=200,lims=c(0.28,0.4,0.04,0.13))
denJ
plot(denJ)
plot(denJ,display="image")
plot(denJ,display="image",drawpoints=TRUE,cex=0.5,pch=19,col.pt='green')
plot(denJ,display="contour")
plot(denJ,display="contour",color.palette=colorRampPalette(c('white','green','blue','red')))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.