Skip to contents

Estimates PCM or RSM thresholds by Newton–Raphson maximisation of the pairwise conditional likelihood (Zwinderman 1995).

Usage

pcml(X, model = c("PCM", "RSM"), anchors = NULL, maxit = 60, tol = 1e-08)

Arguments

X

Persons-by-items integer score matrix. Each item must have at least two observed categories, numbered consecutively from 0. Missing values are handled by pairwise deletion, so linked booklet designs and random missingness estimate without imputation; the item-pair graph must be connected (some person answering items in both of any two blocks), otherwise relative locations between blocks are unidentified and the fit stops with an error naming the blocks – unless anchors fix an item in every block, the disjoint-form equating case.

model

"PCM" or "RSM".

anchors

Optional anchor table for equating: a data frame with columns item (name or column index), k, and tau (the anchor value). A numeric k fixes that single threshold (individual anchoring); k = NA fixes the item's mean location at tau while its thresholds remain free (location anchoring). The remaining parameters are estimated on the anchored scale and no recentring is applied. An optional logical column average, TRUE on every row, selects RUMM2030's average item anchoring instead: every parameter is estimated free, and the calibration is shifted so that the mean location of the anchor items equals the mean of their tau values (one row per item, k = NA). Only the origin changes, so every item, the anchors included, keeps its estimated position relative to the others. Numeric-threshold and item-location anchor values are treated as fixed constants: their uncertainty is not included in the returned covariance or standard errors. With several numeric-threshold anchors, their stated relative spacing is a model constraint as well as a choice of origin. Column names must be unique. PCM only.

maxit, tol

Newton-Raphson iteration cap and convergence tolerance.

Value

A list containing the threshold table thr, covariance matrix cov_tau, pairwise conditional log-likelihood, iteration count, convergence flag, notes, and maximum scores m. In thr, weak marks all thresholds of an item with fewer than eight responses in any category, or a threshold adjacent to a category with fewer than three responses. Standard errors for weak thresholds are reported as NA. If estimation does not converge, the function warns and all standard errors and covariance entries are NA. Sandwich uncertainty is also withheld when fewer than 10 independent persons, fewer than 8 effective persons, no more effective persons than fitted parameters, or a rank-deficient person-score covariance cannot support inference. Effective support is based on informative conditional item-pair contributions; point estimates and exact anchors remain.

Details

For the PCM, the adjacent-category log odds are $$\log\{P(X_{ni}=k)/P(X_{ni}=k-1)\}=\theta_n-\delta_{ik}.$$ Conditioning on the score for an item pair removes \(\theta_n\). The PCM estimates each \(\delta_{ik}\); the RSM imposes \(\delta_{ik}=\beta_i+\tau_k\) through a design matrix.

References

Zwinderman, A. H. (1995). Pairwise parameter estimation in Rasch models. Applied Psychological Measurement, 19(4), 369–375.

Examples

set.seed(1)
d <- seq(-1.5, 1.5, length.out = 6)
X <- matrix(rbinom(400 * 6, 1, plogis(outer(rnorm(400), d, "-"))), 400, 6)
colnames(X) <- paste0("I", 1:6)
pcml(X)$thr
#>   id item k        tau        se anchored  weak
#> 1  1    1 1 -1.5174835 0.1297013    FALSE FALSE
#> 2  2    2 1 -0.7730904 0.1121427    FALSE FALSE
#> 3  3    3 1 -0.2093836 0.1023242    FALSE FALSE
#> 4  4    4 1  0.3667512 0.1047318    FALSE FALSE
#> 5  5    5 1  0.7889434 0.1105680    FALSE FALSE
#> 6  6    6 1  1.3442630 0.1221786    FALSE FALSE
# anchor two items at fixed values (equating)
anchors <- data.frame(item = c("I1", "I6"), k = 1,
                      tau = c(-1.5, 1.5))
pcml(X, anchors = anchors)$thr
#>   id item k        tau        se anchored  weak
#> 1  1    1 1 -1.5000000 0.0000000     TRUE FALSE
#> 2  2    2 1 -0.6880959 0.1613982    FALSE FALSE
#> 3  3    3 1 -0.1211423 0.1463167    FALSE FALSE
#> 4  4    4 1  0.4586830 0.1532659    FALSE FALSE
#> 5  5    5 1  0.8835376 0.1568160    FALSE FALSE
#> 6  6    6 1  1.5000000 0.0000000     TRUE FALSE