FPTL computes values of the First-Passage-Time Location (FPTL) function of a diffusion process for a continuous boundary.
is.fptl tests if its argument is an object of class “fptl”.
print.fptl shows an object of class “fptl”.
Usage
FPTL(dp, t0, T, x0, S, env = NULL, n = 4000)
is.fptl(obj)
## S3 method for class 'fptl'
print(x, ...)
Arguments
dp
an object of class “diffproc” defining a family of diffusion processes.
obj
an R object to be tested.
x
an object of class “fptl”, a result of a call to this function.
t0, T
lower and upper limits of the considered time interval. Must be finite.
x0
fixed initial value of process in the time instant specified in the t0 argument.
S
numerical value of a constant boundary or character string with the mathematical expression of a time-dependent boundary.
env
a named list of objects of numeric or character type specifying the values of names which occur in
the mathematical expressions in objects dp and S, or of names which occur in the specification of the previous values.
Defaults to NULL, interpreted as an empty list.
n
number of points at which the FPTL function is evaluated.
...
additional arguments potentially passed (currently none is considered).
Details
The FPTL function for the problem of the first-passage-time of a diffusion process {X(t), t0 ≤ t ≤ T},
conditioned to X(t0) = x0, through a continuous boundary S(t) is defined as
if x0 > S(t0),
where F(x,t|y,s) is the transition probability distribution function of the process.
Initially, the FPTL function is evaluated at a sequence of n equally spaced values from t0 to T.
Then the FPTL function makes an internal call to the growth.intervals function in order to study the growth
of the evaluation vector. Finally, the FPTL function is evaluated at a more adequate sequence of values from t0 to T according
to the abovementioned study.
The mathematical expression of the boundary S should be a function of t and may include arguments t0,
x0 and the parameters specified in the env argument. The FPTL function checks if the mathematical expression
shows syntax errors and if R can compute its symbolic derivative with respect to t.
The env argument is a list of tagged values in name = value form with name other than x, t, y and s.
To name the expression of a function h(u) as a character string we can use
`h(u)` = value
if we want to show its dependence on u, or h = value otherwise.
The env argument is copied into a temporary environment for evaluating the mathematical expressions in objects dp and S.
R looks for the objects not found into this temporary environment in the parent.frame() environment.
Value
The function FPTL computes and returns an object of class “fptl”. It is a two-component list:
x
a sequence of n values from t0 to T.
y
the corresponding values of the FPTL function for the x sequence.
It also includes three additional attributes:
Call
the unevaluated function call, substituting each name in this call for its value when
the latter has length 1.
dp
the object used as dp argument in the function call.
vars
NULL or a list containing the values of names in the function call for those names
with values of length greater than 1.
is.fptl returns TRUE or FALSE depending on whether its argument is an object of class “fptl” or not.
Since n is usually large, the print.fptl function does not display an object of class “fptl” as a list, but in its ‘basic’
structure instead. However, each component can be displayed separately in the usual way.
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.