poker_score: Poker Score

View source: R/regularity_indices.R

poker_scoreR Documentation

Poker Score

Description

Compute number of times exactly two responses of the same value occur after division of the complete sequence into 5-digit-long sub-sequences

Usage

poker_score(x)

Arguments

x

vector of distinct options of numbers or characters

Details

This function takes a vector x and computes the frequency with which exactly two identical values occur in 5-digit-long sub-sequences of the original vector (2 in 5). If the vector length is not dividable by 5, the last 1-4 values will not be used for the computation. This index is a measure of repetition in a sequence. The resulting score ranges from 0 (no 2 in 5) to (length of x) / 5 (always a 2 in 5 for each sub-sequence).

Value

poker score 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

poker_score(ginsburg1994)
poker_score(evans1978[, 1])
poker_score(evans1978[, 2])


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