Learn R Programming

RecordTest (version 2.2.0)

rcrm: The Classical Record Model

Description

Random generation for the classical record model, i.e., sequences of independent and identically distributed (IID) continuous random variables (RVs).

Usage

rcrm(Trows = 50, Mcols = 100, rdist = stats::rnorm, ...)

Value

A matrix of draws of IID continuous RVs with common distribution

rdist.

Arguments

Trows, Mcols

Integers indicating the number of rows and columns of the returned matrix, i.e., the length and number of series for the record analysis.

rdist

A function that simulates continuous random variables, e.g., runif (fastest in stats package), rnorm or rexp.

...

Further arguments to introduce in the rdist function.

Author

Jorge Castillo-Mateo

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

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

Examples

Run this code
# By default, draw a sample of 100 series of length 50 
# with observations coming from a standard normal distribution 
X <- rcrm()
# Compute its record indicators
I <- I.record(X)
# Implement some tests
N.test(X, distribution = "poisson-binomial")
foster.test(X, weights = function(t) t-1, statistic = "D")

Run the code above in your browser using DataLab