td_uniformity: Test of uniformity of terminal digits
Description
The td_uniformity function tests the uniformity of terminal digits via
Pearson's chi-squared test of goodness-of-fit. Rather than relying on the asymptotic
approximation to the chi-squared distribution, td_unformity uses the chisq_gof
function from the discretefit package to simulate the distribution under the null.
an integer specifying the number of decimals. This can be zero if the terminal digit is
not a decimal.
reps
a positive integer specifying the number of Monte Carlo simulations. The default
is set to 10,000.
tolerance
sets an upper bound for rounding errors when evaluating
whether a statistic for a simulation is greater than or equal to the
statistic for the observed data. The default is identical to the tolerance
set for simulations in the chisq.test function from the stats
package in R.