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 tt in a set of MM vectors (columns of X), respectively. In particular, p.record is the estimated record probability at each time tt.

(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 TRUE, weak records are also counted. Default to FALSE.

Details

Given a matrix formed by MM vectors (columns), measured at TT times (rows), M.record calculates the number of records in the MM vectors at each observed time tt, StS_t.

The function p.record is equivalent, but calculates the proportion of records at each time tt, that is the ratio:

p^t=StM=It,1++It,MM,\hat p_t = \frac{S_t}{M} = \frac{I_{t,1} + \ldots + I_{t,M}}{M},

this proportion is an estimation of the probability of record at that time.

Following the notation in I.record, in summary:

X=(X1,1X1,2X1,MX2,1X2,2X2,MXT,1XT,2XT,M)S.record(S1,S2,,ST)p.record(p^1,p^2,,p^T)\code{X} = \left( \begin{array}{cccc} X_{1,1} & X_{1,2} & \cdots & X_{1,M} \\ X_{2,1} & X_{2,2} & \cdots & X_{2,M} \\ \vdots & \vdots & & \vdots \\ X_{T,1} & X_{T,2} & \cdots & X_{T,M} \\ \end{array} \right) \begin{array}{lc} \stackrel{\code{S.record}}{\longrightarrow} & \Big( S_1, S_2, \cdots, S_T \Big) \\ \\ \stackrel{\code{p.record}}{\longrightarrow} & \Big( \hat p_1, \hat p_2, \cdots, \hat p_T \Big) \\ \end{array}

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 tt (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")


[Package RecordTest version 2.2.0 Index]