Approx.cfpt.density: Approximating First-Passage-Time Densities for Conditioned... In fptdApprox: Approximation of First-Passage-Time Densities for Diffusion Processes

 Approx.cfpt.density R Documentation

Approximating First-Passage-Time Densities for Conditioned Problems

Description

Approx.cfpt.density computes values of the approximate first-passage-time (f.p.t.) density, for a conditioned problem, from an object of class “summary.fptl” that contains the information provided by First-Passage-Time Location (FPTL) function.

Usage

Approx.cfpt.density(sfptl, variableStep = TRUE, from.t0 = FALSE,
to.T = FALSE, skip = TRUE, n = 250, p = 0.2,
alpha = 1, tol = 1e-03, it.max = 50000L)


Arguments

 sfptl an object of class “summary.fptl”, a result of applying the summary.fptl method to an object of class “fptl”. variableStep a logical value indicating whether a variable integration step is used. from.t0 a logical value indicating whether the approximation should be calculated from the lower end of the interval considered, t_0, specified in the sfptl object. to.T a logical value indicating whether the approximation should be calculated to the upper end of the interval considered, T, specified in the sfptl object. skip a logical value indicating whether the intervals at which the FPTL function is near zero could be avoided. n Number of points used to determine the integration step in subintervals [t_i^*, t_{max,i}^+] i=1, \ldots, m, from interesting instants provided by the FPTL function. p Ratio of n used to determine the integration step in subintervals [t_{max,i}^+, t_{i+1}^*], i=1, \ldots, m, [t_0, t_1^*] and [t_{max,m}^{+}, T]. alpha Parameter used to determine the integration step in subintervals [t_{max,i}^+, t_{i+1}^*], i=1, \ldots, m, [t_0, t_1^*] and [t_{max,m}^{+}, T], in order to reduce the computational cost of approximating the f.p.t. density function in those cases where t_{i+1}^* - t_{max,i}^+ >> t_{max,i}^{-} - \thinspace t_i^*, for some i, t_1^* - t_0 >> t_{max,1}^{-} - \thinspace t_1^* or T - t_{max,m}^+ >> t_{max,m}^{-} - \thinspace t_m^*, respectively. tol If the cumulative integral of the approximation is greater than or equal to 1 - tol the algorithm is stopped. it.max If the number of iterations required for the approximation process is greater than it.max, the function asks for permission to continue.

Details

For a diffusion process \{X(t), t_0 \leq t \leq T \}, the f.p.t. variable, conditioned to X(t_0) = x_0, through a continuous boundary S(t) is defined as

T_{S(t), x_0} = \left\{ \begin{array}{lll} Inf \ \{ t \geq t_0 \ : \ X(t) > S(t) \mid X(t_0)=x_0 \} & & if \ x_0 < S(t_0) \\[7pt] Inf \ \{ t \geq t_0 \ : \ X(t) < S(t) \mid X(t_0)=x_0 \} & & if \ x_0 > S(t_0) \end{array} \right. .

Its density function is the solution to a Volterra integral equation of the second kind. The kernel of this equation depends on the infinitesimal moments of the process, the transition probability density function and the boundary.

Nevertheless, and apart from some particular processes and boundaries, closed-form solutions for the integral equation are not available. For this reason, in the cases without explicit solutions, numerical procedures are required. That is the situation considered here and the numerical procedure implemented by the Approx.fpt.density function is the one proposed by Buonocore et al. (1987), based on the composite trapezoid method.

The Approx.cfpt.density function computes efficiently the approximate f.p.t. density by using the information provided by the FPTL function contained in the sfptl object. See the function summary.fptl for details.

By default the function does not compute the approximate f.p.t. density from the time instant t_0, but from a more suitable time instant t_1^* provided by the FPTL function. It also uses a variable integration step.

The function makes an internal call to Integration.Steps function in order to determine the subintervals and integration steps to be used in the application of the numerical algorithm according to the variableStep, from.t0, to.T, n, p and alpha arguments.

In addition, if skip = TRUE, the function checks the approximate density value for each t_{max,i}^+, and, if it is almost 0, the application of the numerical algorithm in the subinterval [t_{max,i}^+, t_{i+1}^*] is avoided, and then continued from instant t_{i+1}^* considering a zero value of the approximate density.

Similarly, if to.T = FALSE, the function checks the cumulative value of the integral for each t_{max,i}^+ provided by the FPTL function and, if it is greater than or equal to 1 - tol, the numerical algorithm is stopped. In any case, the algorithm is stopped in the final t_{max,i}^+, and if the cumulative value of the integral is less than 1 - tol the function issues a warning.

Value

The Approx.cfpt.density function computes and returns an object of class “fpt.density”. It is a three-component list:

 x a sequence of suitable time instants in [t_0, \ T] according to the arguments in the function call. y the approximate conditioned f.p.t. density function values on the x sequence.

 y.x0 NULL (for consistency with the object of class “fpt.density” that produces the Approx.fpt.density function).

It also includes six additional attributes:

 Call the unevaluated function call, substituting each name in this call by its value when the latter has length 1. Steps matrix of subintervals and integration steps to consider for computing the approximate conditioned f.p.t. density. cumIntegral vector of the values of the cumulative integral of the approximation for each subinterval considered. skips a list that contains, for each subinterval, the value 1 if the application of the numerical algorithm has been avoided or integer(0) otherwise. CPUTime matrix of user and system times, by columns, required to approximate the density for each subinterval considered, by rows. summary.fptl the object used as sfptl argument in the function call.

x is the vector result of the concatenation of the sequences of equally spaced values in the suitable subintervals determined by the Integration.Steps function.

Author(s)

Patricia Román-Román, Juan J. Serrano-Pérez and Francisco Torres-Ruiz.

References

Buonocore, A., Nobile, A.G. and Ricciardi, L.M. (1987) A new integral equation for the evaluation of first-passage-time probability densities. Adv. Appl. Probab., 19, 784–800.

Román, P., Serrano, J. J., Torres, F. (2008) First-passage-time location function: Application to determine first-passage-time densities in diffusion processes. Comput. Stat. Data Anal., 52, 4132–4146.

P. Román-Román, J.J. Serrano-Pérez, F. Torres-Ruiz. (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.

P. Román-Román, J.J. Serrano-Pérez, F. Torres-Ruiz. (2014) More general problems on first-passage times for diffusion processes: A new version of the fptdApprox R package. Applied Mathematics and Computation, 244, 432–446.

summary.fptl to locate the f.p.t. variable and create objects of class “summary.fptl”.

is.fpt.density to test for objects of class “fpt.density”.

print.fpt.density to show objects of class “fpt.density”.

report.fpt.density to generate a report.

plot.fpt.density for graphical display.

FPTL to evaluate the FPTL function and create objects of class “fptl”.

Examples

## Continuing the summary.fptl(.) example:

## Making an efficient approximation of the f.p.t. density
## (optimal variable integration steps and small computational cost)
yyy <- Approx.cfpt.density(yy)
yyy

zzz <- Approx.cfpt.density(zz)
zzz

## Making a less efficient approximation of the f.p.t. density
## (optimal fixed integration step but high computational cost related to
##  the efficient approximation)
## Not run:
yyy1 <- Approx.cfpt.density(yy, variableStep = FALSE, from.t0 = TRUE, to.T =
TRUE, skip = FALSE)
yyy1
## End(Not run)


fptdApprox documentation built on Nov. 2, 2023, 5:07 p.m.