View source: R/regularity_indices.R
coupon_score | R Documentation |
Compute average digit length required for all responses to occur
coupon_score(x, options)
x |
vector of distinct options of numbers or characters |
options |
number of available options in sequence |
This function takes a vector x
and computes the mean number of values
that is required for all possible options
to occur. This means that the algorithm
starts to count at the beginning of the sequence until all options
have occurred.
Having observed all options
,
the counting process starts again at zero at the next value of the sequence.
Finally, the mean over the length of these
complete sets of values (containing all options) is computed.
Incomplete sets of responses at the end of a sequence with at least one
option missing are not used for the computation of this index.
Consequently, this index cannot be computed for vectors that do not
contain all possible options
and therefore, NA is returned. The lowest
possible score equals the number of options
, indicating that
each complete set contains every possible option only once. A higher score
indicates that at least one complete set contains values of the same kind at least twice.
Coupon Score 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")}
Towse, J.N., Neil, D. Analyzing human random generation behavior: A review of methods used and a computer program for describing performance. Behavior Research Methods, Instruments, & Computers 30, 583–591 (1998). \Sexpr[results=rd]{tools:::Rd_expr_doi("doi:10.3758/BF03209475")}
runs_index(ginsburg1994, 10)
runs_index(evans1978[, 1], 10)
runs_index(evans1978[, 2], 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.