plot.fpt.density: Plotting Method for fpt.density Objects

plot.fpt.densityR Documentation

Plotting Method for fpt.density Objects

Description

This function creates a plot of the approximate density function for the conditioned or unconditioned f.p.t. problem at hand. Optionally, it displays the information provided by the First-Passage-Time Location (FPTL) function for a conditioned problem. Moreover, for an unconditioned problem creates an additional plot with all the approximate f.p.t. densities conditioned to each value x_0 selected from the initial ditribution.

Usage

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

Arguments

x

an object of class “fpt.density”, a result of a call to Approx.cfpt.density or Approx.fpt.density functions.

from.t0

a logical value indicating whether the approximation 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 for identifying the diffusion process and boundary.

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, for a conditioned f.p.t. problem adds one or more vertical lines and labels to the plot of the approximate density function in order to identify the time instants from which the FPTL function starts growing.

instants

logical. If TRUE, for a conditioned f.p.t. problem adds vertical lines and labels to the plot of the approximate density function in order to identify the other points of interest provided by the FPTL function.

...

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

Details

If from.t0 or to.T arguments are missing the function considers the corresponding arguments used in the call to Approx.cfpt.density or Approx.fpt.density functions, which in turn generated the x object.

If the approximate density functions were calculated from the lower end of the interval considered and from.t0 = FALSE, the approximate density functions should be plotted from the lower endlimit of the first subinterval in the attribute Steps of the x object.

If the approximate density functions were calculated to the upper end of the interval considered and to.T = FALSE, the approximate density functions should be plotted to the upper endlimit of last subinterval in the attribute Steps of the x object.

If dp.legend = TRUE, a legend is placed in the top inside of each 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.

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.

See Also

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

summary.fptl to extract the information contained in objects of class “fptl” and create objects of class “summary.fptl”.

Approx.cfpt.density to approximate the f.p.t. density from objects of class “summary.fptl” and create objects of class “fpt.density”.

Approx.fpt.density to approximate the f.p.t. density from objects of class “dp” and create objects of class “fpt.density”.

Examples


## Continuing the Approx.cfpt.density(.) example:
plot(yyy)
plot(yyy, from.t0 = TRUE)
plot(yyy, growth.points = TRUE)
plot(yyy, growth.points = TRUE, instants = TRUE)
plot(yyy, dp.legend = FALSE, growth.points = TRUE, instants = TRUE)
plot(yyy, cex = 1.25, cex.main = 1.15)
plot(yyy, cex = 1.25, cex.main = 1.15, dp.legend.cex = 0.8, growth.points = TRUE, instants = TRUE)

## Continuing the Approx.fpt.density example:
plot(yyy.cp)
## Not run: 
plot(yyy.ucp)
## End(Not run)


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