plot.fptl: Plotting Method for fptl Objects

plot.fptlR Documentation

Plotting Method for fptl Objects

Description

This function creates a plot of the First-Passage-Time Location (FPTL) function for a first-passage-time problem, displaying the information of interest contained in an object of class “fptl” and a corresponding object of class “summary.fptl”.

Usage

## S3 method for class 'fptl'
plot(x, sfptl, from.t0 = TRUE, to.T = TRUE, dp.legend = TRUE,  
     dp.legend.cex = 1, ylab = TRUE, growth.points = TRUE, 
     instants = TRUE, ...)

Arguments

x

an object of class “fptl”, a result of a call to FPTL.

sfptl

an object of class “summary.fptl”, a result of applying the summary method to the x object.

from.t0

a logical value indicating whether the FPTL function should be plotted from the lower end of the interval considered, t_0, specified in the x object.

to.T

a logical value indicating whether the approximation should be plotted to the upper end of the interval considered, T, specified in the x object.

dp.legend

logical. If TRUE, adds a legend to the plot in order to identify the diffusion process and boundary used in the call to FPTL function which in turn generated the x object.

dp.legend.cex

the magnification to be used for legend relative to the current setting of cex.

ylab

logical. If TRUE, adds a title for the y axis.

growth.points

logical. If TRUE, adds one or more vertical lines and labels to the plot in order to identify the time instants from which the FPTL function starts growing.

instants

logical. If TRUE, draws and identify the other points of interest provided by the FPTL function.

...

graphical parameters to set before generating the plot, see par.

Details

If the sfptl object is missing, the function makes an internal call to the summary.fptl function in order to identify the points of interest provided by the FPTL function.

If the FPTL function shows at least a local maximum and from.t0 = FALSE, the FPTL function should be plotted from the first time instant from which the function starts growing.

If the FPTL function shows at least a local maximum and to.T = FALSE, the FPTL function should be plotted to the t_{max,m}^{+} value related to the last local maximum t_{max,m} if the function does not decrease subsequently, or to the local minimum following the last local maximum t_{max,m} if the function decreases subsequently.

If dp.legend = TRUE, a legend is placed in the top inside of the plot frame.

Additional graphical arguments as cex, lwd and ps can be specified.

Author(s)

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

References

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.

See Also

FPTL to know more about the FPTL function and objects of class “fptl”.

summary.fptl for extract the information of interest in an object of class “fptl”.

Examples

## Continuing the FPTL(.) example:

plot(y)
plot(y, cex.main = 1.4, growth.points = FALSE)
plot(y, cex.main = 1.4, growth.points = FALSE, instants = FALSE)
plot(y, cex.main = 1.4, dp.legend = FALSE, growth.points = FALSE, instants = FALSE)
plot(y, cex = 1.25, cex.main = 1.25)
plot(y, cex = 1.25, cex.main = 1.25, dp.legend.cex = 0.8)

plot(z)
plot(z, from.t0 = FALSE)
plot(z, to.T = FALSE)
plot(z, from.t0 = FALSE, to.T = FALSE)

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