View source: R/core-functions.R
GRIMMER_test | R Documentation |
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
)
mean |
The mean of the distribution |
sd |
The standard deviation of the distribution |
n_obs |
The number of observations (sample size) |
m_prec |
The precision of the mean, as number of digits after the decimal point.
If not provided, taken based on the significant digits of |
sd_prec |
The precision of the standard deviation, again only needed if reported standard deviation ends in 0. |
n_items |
Number of items in scale, if distribution represents scale averages. Defaults to 1, which represents any single-item measure. |
min_val |
(Optional) Scale minimum. If provided alongside max_val, the function checks whether the SD is consistent with that range. |
max_val |
(Optional) Scale maximum. |
Logical TRUE/FALSE indicating whether given standard deviation is possible, given the other parameters
anaya2016grimmerrsprite2
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.