View source: R/regularity_indices.R
runs_index | R Documentation |
Compute runs index of randomness
runs_index(x, asc = TRUE)
x |
vector of distinct options of numbers or characters |
asc |
Indicate whether to compute variance of ascending or descending runs. Default value is set to ascending. |
This function takes a vector x
and computes the population variance
of all ascending or descending run lengths, depending on asc
.
An ascending run is defined by a value in a sequence being followed by
a larger value in the next position of the sequence. A score of 0 indicates
no variance in run length, i.e., runs always have the same length. Higher
scores indicate an increased degree of variation in run length.
The default version of this function computes the population variance of
ascending run lengths.
runs of x
Ginsburg N, Karpiuk P. Random Generation: Analysis of the Responses. Perceptual and Motor Skills. 1994;79(3):1059-1067. \Sexpr[results=rd]{tools:::Rd_expr_doi("doi:10.2466/pms.1994.79.3.1059")}
runs_index(ginsburg1994)
runs_index(ginsburg1994, FALSE)
runs_index(evans1978[, 1])
runs_index(evans1978[, 2])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.