This function tests whether a given standard deviation (with a specific precision) can result from a sample of a given size based on integer responses to one or more items. The test was first proposed by Anaya (2016); here, the algorithm developed by Allard (2018) is used, extended by Aurélien Allard to support multi-item scales.
GRIMMER_test(
mean,
sd,
n_obs,
m_prec = NULL,
sd_prec = NULL,
n_items = 1,
min_val = NULL,
max_val = NULL
)
The mean of the distribution
The standard deviation of the distribution
The number of observations (sample size)
The precision of the mean, as number of digits after the decimal point.
If not provided, taken based on the significant digits of mean
- so only needed if reported mean ends in 0
The precision of the standard deviation, again only needed if reported standard deviation ends in 0.
Number of items in scale, if distribution represents scale averages. Defaults to 1, which represents any single-item measure.
(Optional) Scale minimum. If provided alongside max_val, the function checks whether the SD is consistent with that range.
(Optional) Scale maximum.
Logical TRUE/FALSE indicating whether given standard deviation is possible, given the other parameters
Anaya J (2016). “The GRIMMER test: A method for testing the validity of reported measures of variability.” PeerJ Preprints, 4, e2400v1.
# A sample of 18 integers with mean 3.44 cannot have an SD of 2.47. This is shown by
GRIMMER_test(mean = 3.44, sd = 2.47, n_obs = 18)
#> [1] FALSE