p.record {RecordTest} | R Documentation |
Probabilities of Record
Description
S.record
and p.record
return the sample number of
records and mean number of records at each time in a set of
vectors (columns of
X
), respectively. In particular,
p.record
is the estimated record probability at each time .
(For the introduccion to records see Details in I.record
.)
Usage
p.record(X, record = c("upper", "lower"), weak = FALSE)
S.record(X, record = c("upper", "lower"), weak = FALSE)
Arguments
X |
A numeric vector, matrix (or data frame). |
record |
A character string indicating the type of record to be calculated, "upper" or "lower". |
weak |
Logical. If |
Details
Given a matrix formed by vectors (columns), measured at
times (rows),
M.record
calculates the number of records in
the vectors at each observed time
,
.
The function p.record
is equivalent, but calculates the proportion
of records at each time , that is the ratio:
this proportion is an estimation of the probability of record at that time.
Following the notation in I.record
, in summary:
Summaries for both upper and lower records can be calculated.
Value
A vector with the number (or proportion in the case of
p.record
) of records at each time (row).
Author(s)
Jorge Castillo-Mateo
References
Cebrián AC, Castillo-Mateo J, Asín J (2022). “Record Tests to Detect Non Stationarity in the Tails with an Application to Climate Change.” Stochastic Environmental Research and Risk Assessment, 36(2), 313-330. doi:10.1007/s00477-021-02122-w.
See Also
I.record
, L.record
,
N.record
, Nmean.record
,
R.record
, records
Examples
Y1 <- c( 1, 5, 3, 6, 6, 9, 2)
Y2 <- c(10, 5, 3, 6, 6, 9, 2)
Y3 <- c( 5, 7, 3, 6, 19, 2, 20)
Y <- cbind(Y1, Y2, Y3)
S.record(Y)
p.record(Y)
S.record(ZaragozaSeries)
p.record(ZaragozaSeries, record = "l")