Learn R Programming

RecordTest (version 2.2.0)

R.record: Record Values

Description

Returns the record values of the values in a vector. A record value is the magnitude of a record observation.

If the argument X is a matrix, then each column is treated as a different vector.

Usage

R.record(X, record = c("upper", "lower"), weak = FALSE)

Value

If X is a vector, the function returns a list containing the vector of record values. If X is a matrix, the function returns a list where each element is a vector indicating the record values of the corresponding X column.

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.

Author

Jorge Castillo-Mateo

Details

The sequence of record values \(\{R_1,\ldots,R_I\}\) can be expressed in terms of the record times L.record by $$R_i = X_{L_i}.$$

Record values can be calculated for both upper and lower records.

References

Arnold BC, Balakrishnan N, Nagaraja HN (1998). Records. Wiley Series in Probability and Statistics. Wiley, New York. tools:::Rd_expr_doi("10.1002/9781118150412").

See Also

I.record, L.record, N.record, Nmean.record, p.record, R.record, records, S.record

Examples

Run this code
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)

R.record(Y1)
R.record(Y)

Run the code above in your browser using DataLab