L.plot {RecordTest} | R Documentation |
Times of Record Plot
Description
This function builds a ggplot object to display the upper and lower record times for both forward and backward directions.
Usage
L.plot(
X,
all = TRUE,
record = c("upper", "lower"),
point.col = "grey23",
point.alpha = 0.8,
line.col = "grey95"
)
Arguments
X |
A numeric vector, matrix (or data frame). |
all |
Logical. If |
record |
If |
point.col , point.alpha |
Colour and transparency of the points. |
line.col |
Colour to plot lines. |
Details
The function can be applied to plot the record times in a vector
(if argument X
is a vector) or to plot and compare the record
times in a set of vectors (if argument X
is a matrix). In the
latter case, the approach to obtain the record times is applied to each
column of the matrix.
If all = TRUE
, a matrix of four panels is displayed for upper and
lower records, and for the forward and backward (series_rev
)
directions. Otherwise, only one type of forward record is displayed.
An example of use of a plot with similar ideas is shown in Benestad (2004, Figures 3 and 8).
Value
A ggplot object.
Author(s)
Jorge Castillo-Mateo
References
Benestad RE (2004). “Record-Values, Nonstationarity Tests and Extreme Value Distributions.” Global and Planetary Change, 44(1-4), 11-26. doi:10.1016/j.gloplacha.2004.06.002.
See Also
Examples
Y <- c(1, 5, 3, 6, 6, 9, 2, 11, 17, 8)
L.plot(Y, all = FALSE)
L.plot(ZaragozaSeries, point.col = 1)