series_untie: Breaking Record Ties

View source: R/series_untie.R

series_untieR Documentation

Breaking Record Ties

Description

Breaks record ties when observations have been rounded.

Usage

series_untie(X)

Arguments

X

A numeric vector, matrix (or data frame).

Details

This function is used in the data preparation (or pre-processing) often required to apply the exploratory and inference tools based on theory of records within this package.

The theory of records on which the hypothesis tests are based assumes that the random variables are continuous, so that the probability that two observations take the same value is zero. Most of the data collected is rounded, giving a certain probability to the tie between records, thereby reducing the number of new records (see, e.g., Wergen et al. 2012).

This function breaks ties by adding a uniform random variable to each element of X. The function computes the maximum number of decimal digits (let it be n) for any element in X. Then the uniform variable is sampled in the interval (-5 \times 10^{-(n+1)}, 5 \times 10^{-(n+1)}), so the records in the original (rounded) series are also records in the new series.

Value

A matrix equal to X whose elements have been added a sample from a uniform variable, different for each element.

Author(s)

Jorge Castillo-Mateo

References

Wergen G, Volovik D, Redner S, Krug J (2012). “Rounding Effects in Record Statistics.” Physical Review Letters, 109(16), 164102. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1103/physrevlett.109.164102")}.

See Also

series_double, series_record, series_rev, series_split, series_ties, series_uncor

Examples

set.seed(23)
X <- matrix(round(stats::rnorm(100), digits = 1), nrow = 10, ncol = 10)
series_untie(X)

series_untie(ZaragozaSeries)


RecordTest documentation built on Aug. 8, 2023, 1:09 a.m.