grimmer | R Documentation |
grimmer()
checks if reported mean and SD values of integer
data are mathematically consistent with the reported sample size and the
number of items that compose the mean value. It works much like grim()
.
The function is vectorized, but it is recommended to use grimmer_map()
for testing multiple cases.
grimmer(
x,
sd,
n,
items = 1,
show_reason = FALSE,
rounding = "up_or_down",
threshold = 5,
symmetric = FALSE,
tolerance = .Machine$double.eps^0.5
)
x |
String. The reported mean value. |
sd |
String. The reported standard deviation. |
n |
Integer. The reported sample size. |
items |
Integer. The number of items composing the |
show_reason |
Logical. For internal use only. If set to |
rounding |
String. Rounding method or methods to be used for
reconstructing the values to which |
threshold |
Numeric. If |
symmetric |
Logical. Set |
tolerance |
Numeric. Tolerance of comparison between |
GRIMMER was originally devised by Anaya (2016). The present
implementation follows Allard's (2018) refined Analytic-GRIMMER algorithm.
It uses a variant of Analytic-GRIMMER first implemented in
rsprite2::GRIMMER_test()
that can be applied to multi-item scales.
The scrutiny version embeds GRIMMER in the broader system of consistency
testing, as laid out in
Consistency
tests in depth. The grimmer()
function
is a vectorized (multiple-case) version of this basic implementation. For
more context and variable name translations, see the top of the R/grimmer.R
source file.
Logical. TRUE
if x
, sd
, n
, and items
are mutually
consistent, FALSE
if not.
Allard, A. (2018). Analytic-GRIMMER: a new way of testing the possibility of standard deviations. https://aurelienallard.netlify.app/post/anaytic-grimmer-possibility-standard-deviations/
Anaya, J. (2016). The GRIMMER test: A method for testing the validity of reported measures of variability. PeerJ Preprints. https://peerj.com/preprints/2400v1/
# A mean of 5.23 is not consistent with an SD of 2.55
# and a sample size of 35:
grimmer(x = "5.23", sd = "2.55", n = 35)
# However, mean and SD are consistent with a
# sample size of 31:
grimmer(x = "5.23", sd = "2.55", n = 31)
# For a scale composed of two items:
grimmer(x = "2.74", sd = "0.96", n = 63, items = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.