If the packages are not ready installed on your computer use the
function install.packages()
. Then we include the
libraries:
library(iarm)
library(corrplot)
library(readr)
Uni-dimensionality is a fundamental assumption in the Rasch model. In fact, it is central to all item response theory (IRT) models.
The SPADI was shown to be two-dimensional in a Rasch analysis with
the revised version of the disability sub scale including six polytomous
items (Jerosch-Herold et al, 2018). Note that we remove person 86
because of missing values. We read in the data using the
read_csv()
function from the readr
package.
myfile <- "https://raw.githubusercontent.com/ERRTG/ERRTG.github.io/master/SPADI.csv"
SPADI <- read_csv(myfile)
We create a new data frame SPADI.items0
containing the
items.
SPADI.items0 <- SPADI[, c("P1", "P2", "P3", "P4", "P5", "D1", "D2", "D3", "D4", "D5",
"D6", "D7", "D8")]
We remove persons with only missing values and create a new data
frame SPADI.items
.
ok <- as.logical((rowSums(is.na(SPADI.items0)) - ncol(SPADI.items0)))
SPADI.items <- SPADI.items0[ok, ]
which(!ok)
[1] 86
Before we analyse the residual correlations we have a look at the
regular item correlations. The correlations between items are calculated
using the cor()
function. The default is the Pearson
correlation coefficient (appropriate for dichotomous items). We specify
use = "pairwise.complete.obs"
such that the correlation
between each pair of items is computed using all complete pairs of
observations on those items.
SPADI.cor.items <- cor(SPADI.items, use = "pairwise.complete.obs")
To graphically displays the correlation matrix we use the
corrplot()
function.
corrplot(SPADI.cor.items)
Again there are high positive correlations between the items (because they measure the same thing).
We compute the parameter estimates of a partial credit model for
polytomous item responses using the PCM()
function from the
eRm
package.
PCM <- PCM(SPADI.items)
We estimate the person locations and compute the residuals.
SPADI.locations <- person.parameter(PCM)
SPADI.resid <- residuals(SPADI.locations)
Then, we look at the correlation between the residuals.
SPADI.cor.resid <- cor(SPADI.resid, use = "pairwise.complete.obs")
corrplot(SPADI.cor.resid)
From the correlation plot we see that there are negative values.
We can find the largest \(Q_3\) value (the largest correlation) and use the recommendations to evaluate if this constitutes an anomaly.
SPADI.Q3.max <- max(SPADI.cor.resid[(SPADI.cor.resid < 1)])
SPADI.Q3.average <- mean(SPADI.cor.resid[(SPADI.cor.resid < 1)])
SPADI.Q3.max
[1] 0.3926997
SPADI.Q3.star <- SPADI.Q3.max - SPADI.Q3.average
SPADI.Q3.star
[1] 0.4702648
We see that in this example the difference between the largest \(Q_3\) value and the average residual
correlation is larger than .20, so there is evidence of local response
dependence. This can be visualised using the corrplot()
function by specifying p.mat
and
sig.level
.
M <- SPADI.cor.resid
meanM <- mean(M[upper.tri(M)])
adM <- M - meanM
corrplot(M, p.mat = adM, sig.level = 0.2, insig = "pch", type = "upper", diag = FALSE,
cl.pos = "n")
Christensen, K. B., Makransky, G., & Horton, M. (2017). Critical Values for Yen’s Q 3 : Identification of Local Dependence in the Rasch Model Using Residual Correlations. Applied Psychological Measurement, 41(3), 178-194. http://doi.org/10.1177/0146621616677520
Jerosch-Herold, C., Chester, R., Shepstone, L., Vincent, J. I., & MacDermid, J. C. (2017). An evaluation of the structural validity of the shoulder pain and disability index (SPADI) using the Rasch model. Quality of Life Research, 27(2), 389-400. http://doi.org/10.1007/s11136-017-1746-7
Kreiner, S., & Christensen, K. B. (2004). Analysis of Local Dependence and Multidimensionality in Graphical Loglinear Rasch Models. Communications in Statistics - Theory and Methods, 33(6), 1239-1276. http://doi.org/10.1081/STA-120030148
Marais, I. (2013). Local Dependence. In Rasch Models in Health (Vol. 44, pp. 111-130). Hoboken, NJ USA: John Wiley & Sons, Inc. http://doi.org/10.1002/9781118574454.ch7
Yen, W. M. (1984). Effects of Local Item Dependence on the Fit and Equating Performance of the Three-Parameter Logistic Model. Applied Psychological Measurement, 8(2), 125-145. http://doi.org/10.1177/014662168400800201