series_untie | R Documentation |
Breaks record ties when observations have been rounded.
series_untie(X)
X |
A numeric vector, matrix (or data frame). |
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.
A matrix equal to X
whose elements have been added a
sample from a uniform variable, different for each element.
Jorge Castillo-Mateo
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")}.
series_double
, series_record
,
series_rev
, series_split
,
series_ties
, series_uncor
set.seed(23)
X <- matrix(round(stats::rnorm(100), digits = 1), nrow = 10, ncol = 10)
series_untie(X)
series_untie(ZaragozaSeries)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.