View source: R/reliability_curve.R
| RMreliabilityCurve | R Documentation |
Plots (or tabulates) how precisely a scale measures at each point of the
latent continuum, rather than collapsing precision to the single number
reported by RMreliability(). The curve is the conditional standard error
of measurement SEM(\theta) = 1/\sqrt{I(\theta)}, the test information
I(\theta) it comes from, or the conditional reliability derived from
either.
RMreliabilityCurve(
data,
statistic = "sem",
method = "WLE",
benchmark = NULL,
reference = "marginal",
items = NULL,
item_params = NULL,
boot = FALSE,
boot_iter = 200,
conf_int = 0.95,
parallel = TRUE,
n_cores = NULL,
seed = NULL,
show_density = TRUE,
theta_range = NULL,
n_nodes = 161L,
verbose = FALSE,
output = "ggplot"
)
data |
A data.frame or matrix of item responses. Items must be scored
starting at 0 (non-negative integers). Missing values ( |
statistic |
Character. The quantity on the y-axis: |
method |
Character. Person-location estimator, |
benchmark |
Numeric in (0, 1) or |
reference |
Character. Horizontal line showing the flat summary that a
single coefficient implies: |
items |
Optional character vector of column names, or numeric column indices, selecting a subset of items. Useful for comparing a short form against the full scale. |
item_params |
Optional pre-specified item parameters, used in place of
the thresholds estimated from |
boot |
Logical. If |
boot_iter |
Integer. Bootstrap iterations when |
conf_int |
Numeric in (0, 1). HDCI width for the bootstrap band.
Default |
parallel |
Logical. Use |
n_cores |
Integer or |
seed |
Integer or |
show_density |
Logical. Draw the respondent location distribution as a
background band. Default |
theta_range |
Numeric length-2 vector, or |
n_nodes |
Integer. Number of points on the theta grid. Default |
verbose |
Logical. Print a progress bar for the bootstrap. Default
|
output |
Character. |
What the curve is. Test information I(\theta) = \sum_i
\mathrm{Var}_i(\mathrm{score} \mid \theta) is summed from the CML item
thresholds (psychotools), and the conditional standard error follows as
1/\sqrt{I(\theta)}. Both are properties of the item set alone. The
respondent distribution is drawn behind the curve because precision only
matters where people actually are, but it does not enter the curve.
Conditional reliability, and which formula. Two definitions circulate:
\rho(\theta) = \frac{\sigma^2}{\sigma^2 + SEM(\theta)^2}
\qquad \mathrm{and} \qquad
\rho(\theta) = 1 - \frac{SEM(\theta)^2}{\sigma^2}
with \sigma the latent SD estimated by marginal maximum likelihood.
This function uses the first, the ratio form, for three reasons. It is
bounded in (0, 1), whereas the subtractive form returns negative values
whenever SEM(\theta) > \sigma, which is common at the floor of a
skewed scale and at both tails of a short one. It treats \sigma^2 as
true-score variance, which is what the MML estimate of the latent SD is.
And it tracks the reliability of the observed scores far more closely.
Milanzi et al. (2015) report the subtractive coefficient falling to
-0.120 against a true value of 0.480 for a 1PL with
\sigma^2 = 0.25. Replicating their design (dev/milanzi_check.R,
1000 replications per cell) gives a mean absolute error against the exact
expected-sum-score reliability of 0.22 for the subtractive form and
0.018 for the ratio form, with the subtractive form negative in 99.7%
of replications of their lowest-variance cell. For polytomous Rasch data at
5 to 20 items the corresponding errors are 0.18 and 0.015.
The advantage is concentrated where it matters rather than uniform. Where information is high relative to the trait variance the two forms are close and either can be nearer the truth. The gap comes from the low-information cases, where the subtractive form does not merely lose accuracy but leaves the (0, 1) interval altogether.
marginal_ratio is the latent-density-weighted mean of the reliability
curve rather than the ratio formed from the averaged error variance. The two
differ by Jensen's inequality, and the curve mean is the more accurate of
the pair (mean absolute error 0.015 against 0.018 for binary data, 0.010
against 0.015 for polytomous).
RMreliability() reports the same ratio-form coefficient in its
"Marginal (curve mean)" row, so the scalar and the curve agree. The
superseded subtractive value is still returned as marginal_green for
comparison with easyRasch2 1.2.0 and earlier, and with mirt::marginal_rxx()
and similar software.
Limits. The information-based standard error is asymptotic, and is only
an approximation for short scales; Milanzi et al. (2015) find the worst
behaviour with six items. The curve describes the precision of the person
location estimate on the logit scale, which is not the same quantity as the
reliability of a raw sum score, and reliability computed on a latent scale
is consistently higher than its manifest counterpart. Use RMscoreSE() for
the raw-score view.
No default benchmark. benchmark is NULL unless asked for, in keeping
with the package's treatment of fixed rules of thumb. McNeish and Dumas
(2025), whose respondent-weighted summary this borrows, are explicit that
their own interpretive percentages are heuristic and should not be used as
cutoffs.
If output = "ggplot": a ggplot object.
If output = "dataframe": a data.frame with one row per grid point and
columns theta, information, sem, reliability, plus
<statistic>_lower / <statistic>_upper band columns when
boot = TRUE. Attributes carry the summary quantities: sigma,
marginal_ratio (the latent-density-weighted mean of the reliability
curve, matching RMreliability()), marginal_green (the superseded
subtractive coefficient), sem_average (root mean error variance),
benchmark,
benchmark_range, benchmark_percent and n_not_estimable.
If output = "kable": a knitr_kable summary table of those quantities.
Green, B. F., Bock, R. D., Humphreys, L. G., Linn, R. L., & Reckase, M. D. (1984). Technical Guidelines for Assessing Computerized Adaptive Tests. Journal of Educational Measurement, 21(4), 347-360. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1111/j.1745-3984.1984.tb01039.x")}
McNeish, D., & Dumas, D. (2025). Reliability representativeness: How well does coefficient alpha summarize reliability across the score distribution? Behavior Research Methods, 57(3), 93. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.3758/s13428-025-02611-8")}
Milanzi, E., Molenberghs, G., Alonso, A., Verbeke, G., & De Boeck, P. (2015). Reliability measures in item response theory: Manifest versus latent correlation functions. British Journal of Mathematical and Statistical Psychology, 68(1), 43-64. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1111/bmsp.12033")}
RMreliability(), RMscoreSE(), RMtargeting()
if (requireNamespace("ggplot2", quietly = TRUE)) {
# Conditional SEM across the scale
RMreliabilityCurve(phq9[, 1:9])
# Conditional reliability, with the region reaching .8 shaded
RMreliabilityCurve(phq9[, 1:9], statistic = "reliability",
benchmark = 0.8)
}
# Summary quantities
RMreliabilityCurve(phq9[, 1:9], benchmark = 0.8, output = "kable")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.