I'm trying to fit longitudinal item response theory (IRT) models in R. I have a test that was administered at multiple measurement occasions. I'd like to examine individuals' growth curves of factor scores (i.e., ability levels) from graded response models (GRMs). I have used the ltm package in R to fit cross-sectional GRM models in IRT, but it's not clear to me how (or whether it's even possible in ltm) to extend the models to handle repeated measures of the same items across time. How can I fit growth curves to longitudinal GRM factor scores to see changes in means/variances of ability levels over time? If this isn't possible with the ltm package, what packages/functions permit this? Specific code examples would be especially appreciated.
Here are empirical examples similar to what I'm looking to do (except the examples use a Rasch model for binary items where I'm using GRMs for polytomous data):
For example, I'd like to be able to estimate and plot individuals' growth curves to examine mean-level change in ability levels over time (from McArdle & Grimm, 2011):
And, I'd like to be able to estimate an average or prototypical growth curve for the sample (from McArdle & Grimm, 2011):
Here's a simulated data set with 20 polytomous items (1-3 response scale) at 3 different time points:
library(mirt)
library(mvtnorm)
set.seed(1)
numberItems <- 20
numberItemLevels <- 2
sampleSize <- 1000
a <- matrix(rlnorm(numberItems, .2, .2))
d <- matrix(rnorm(numberItems*numberItemLevels), numberItems)
d <- t(apply(d, 1, sort, decreasing=TRUE))
Theta <- mvtnorm::rmvnorm(n=sampleSize, 0, matrix(1))
t1 <- simdata(a, d, N=sampleSize, itemtype="graded", Theta=Theta)
t2 <- simdata(a, d, N=sampleSize, itemtype="graded", Theta=Theta+.5)
t3 <- simdata(a, d, N=sampleSize, itemtype="graded", Theta=Theta+1)
dat <- data.frame(t1, t2, t3)
Theta
matrix forsimdata()
that actually changes over time and use that instead of just random values for each test? This just looks like 3 completely unrelated tests were administered. $\endgroup$