runs_index: Compute runs index of randomness

View source: R/regularity_indices.R

runs_indexR Documentation

Compute runs index of randomness

Description

Compute runs index of randomness

Usage

runs_index(x, asc = TRUE)

Arguments

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.

Details

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.

Value

runs of x

References

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")}

Examples

runs_index(ginsburg1994)
runs_index(ginsburg1994, FALSE)
runs_index(evans1978[, 1])
runs_index(evans1978[, 2])


TImA97/randfindR documentation built on July 1, 2024, 7:56 p.m.