The goal of msd is to implement functions related to the Method of Successive Dichotomizations (MSD), which is a computationally efficient method of estimating parameters for a polytomous Rasch model that estimates ordered rating category thresholds. MSD applies to ordinal rating scale data and is an improvement over polytomous Rasch models such as the Andrich rating scale model and the Partial Credit Model that often estimate disordered thresholds.
You can install the released version of msd from CRAN with:
install.packages("msd")
Suppose a health status questionnaire is administered to patients who rate the difficulty of items (e.g., tasks they must perform) using ordinal rating categories (e.g., integers from 0-5). We can use msd to estimate item measures (estimates of task difficulty), person measures (estimates of patient abilities) and rating category thresholds that define the average rating scale used by the sample of patients.
library(msd)
# Using a randomly generated ratings matrix with ratings from 0 to 5
<- as.numeric(sample(0:5, 1000, replace = TRUE))
d <- matrix(d, nrow = 50, ncol = 20)
dm <- msd(dm, misfit = TRUE)
m
# m contains the estimated item measures, person measures, rating
# category thresholds and their standard errors as well as other
# diagnostic statistics such infit, outfit and reliability measures
If item measures and thresholds are already known from a large study and we want to estimate person measures for a different sample of patients, use the pms function.
# Estimate person measures based on known item measures and thresholds.
<- as.numeric(sample(0:5, 200, replace = TRUE))
d2 <- matrix(d2, nrow = 10, ncol = 20)
dm2 = m$item_measures
im = m$thresholds
th <- pms(data = dm2, items = im, thresholds = th, misfit = TRUE) pm
The accuracy of msd can be tested using the simdata function, which generates simulated rating scale data given item measures, person measures and thresholds. Because msd sets the axis origin at the mean item measure, “true” item measures should have a mean of zero. Similarly, because a non-zero mean threshold changes the person measure by that same amount, the “true” mean threshold should be set to zero.
# Test the accuracy of msd. First, generate simulated rating scale data with 15% missing
# data and the rating scale going from 0 to 5.
= runif(100, -2, 2)
im = im - mean(im)
im = runif(200, -2, 2)
pm = sort(runif(5, -2, 2))
th = th - mean(th)
th = simdata(im, pm, th, missingProb = 0.15, minRating = 0)
d
# Compare msd estimated parameters to true values. Linear regression should yield a slope
# very close to 1 and an intercept very close to 0.
= msd(d)
m lm(m$item_measures ~ im)
#>
#> Call:
#> lm(formula = m$item_measures ~ im)
#>
#> Coefficients:
#> (Intercept) im
#> -2.306e-17 1.026e+00
lm(m$person_measures ~ pm)
#>
#> Call:
#> lm(formula = m$person_measures ~ pm)
#>
#> Coefficients:
#> (Intercept) pm
#> -0.01133 1.01436
lm(m$thresholds ~ th)
#>
#> Call:
#> lm(formula = m$thresholds ~ th)
#>
#> Coefficients:
#> (Intercept) th
#> -0.00224 1.00751