wobble | R Documentation |
wobble
adds noise from a continuous uniform distribution to the
observations to remove ties.
wobble(x, y, check = TRUE)
x |
a (non-empty) numeric vector of data values. |
y |
a (non-empty) numeric vector of data values. |
check |
a logical value indicating whether the samples should be checked
for bindings prior to adding uniform noise or not, defaults to
|
If check = TRUE
the function checks whether all values in the two numeric
input vectors are distinct. If so, it returns the original values, otherwise
the ties are removed by adding noise from a continuous uniform distribution
to all observations. If check = FALSE
, it simply determines the number
of digits and adds uniform noise.
More precisely, we determine the minimum number of digits d_min
in the sample
and then add random numbers from the U[-0.5 10^(-d_min
), 0.5 10^(-d_min
)]
distribution to each of the observations.
A named list of length two containing the modified input samples x
and
y
.
FriGat07rankrobnptests
x <- rnorm(20); y <- rnorm(20); x <- round(x) wobble(x, y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.