unif_digits | R Documentation |
The 'uniform_digits()' function utilizes the 'count_digits()' function to count the number of times that each digit occurs and the 'chisq.test()' function from the stats package to test the assumption that the digits are uniformly distributed. Several other measures of deviation from the uniform distribution are also available.
unif_digits( data, variable, group = NULL, decimal_place = 1, measures = c("mad"), counts = FALSE )
data |
A data frame |
variable |
A numeric variable that includes the first decimal place. |
group |
A second variable used to group the primary variable |
decimal_place |
The decimal place for which digits are counted. The default is set to one but any place may be specified by numeric rank, i.e. "1" for the 1st decimal (tenths), "2" for the 2nd decimal (hundreds), etc. |
measures |
Measures of the degree to which the data deviates from the uniform distribution. |
counts |
The default is set as FALSE. If this is changed to TRUE, then results from count_digits will also be included in the output. |
This y Leemis, Schmeiser, and Evans (2000) for max. Cho and Gaines (2007), Euclidean distance
A tibble that includes a column called "chisq" that hold the value of the chi-square statistic and a column called "chisq_p" that holds the p-value derived form the chi-square statistic.
unif_digits(bodyweight, obs, group)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.