Repeated measures IRT (growth curve)

222 views
Skip to first unread message

Cursos Psi

unread,
Oct 30, 2017, 5:03:11 PM10/30/17
to mirt-package
Dear Phil, thanks for mitt package and for being always so supportive with questions here. 
I`m facing a challenge to model the ability of the same students measured in 3 time-points. I've read and did all the steps from https://philchalmers.github.io/mirt/html/Longitudinal-IRT.html but I was unable to adapt the code for my results. Because of that, I gently ask for your help (if it`s possible).

I have a Likert-type questionnaire with 6 items that can be replied with 0,1 or 2 and it was used during 3 years in a row with the same participants. This questionnaire is unidimensional.

Below it's what I did.

head(data) #item 1-6 was from 1st year, 7-12 was from 2nd year and 13-18 the third year
  x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 x18
1  2  2  2  1  2  2  2  2  1   2   2   1   2   2   0   2   2   2
2  2  2  2  2  2  2  2  2  2   0   2   2   2   2   2   2   2   2
3  1  2  2  1  2  1  2  2  2   2   2   2   2   2   2   2   2   2
4  2  2  2  2  2  2  2  2  2   2   2   2   2   2   2   2   2   2
5  2  2  2  2  2  2  2  2  2   1   2   2   2   2   2   2   2   2
6  2  2  2  2  2  2  2  2  2   2   2   2   2   2   2   2   2   2

model <- mirt.model('Intercept = 1-18
                     Slope = 1-18
                    COV = Intercept*Slope, Intercept*Intercept, Slope*Slope
                    MEAN = Intercept, Slope') #as you can see, I modified the syntax because I have only 6 items, 3 times (18)

itemloadings <- rep(1:6, times = 3) #same thing here. 6 items, 3 times
sv <- bfactor(dat, itemloadings, model, pars='values') 

sv$value[sv$name == 'a1'] <- 1
sv$est[sv$name == 'a1'] <- FALSE
sv$value[sv$name == 'a2'] <- rep(0:2, each=6)
sv$est[sv$name == 'a2'] <- FALSE
#I˜m sorry, but I could not understand this block but I've preserved

# create constraint list
constraints <- list()
itemnames <- colnames(dat)
pick <- c(0,6,12) #I modified because I have 6 items
for(i in 1:6){    
  # accross time item constraints
  constraints[[paste0('slope.', i)]] <- sv$parnum[sv$name == paste0('a',2+i) & sv$est]
  for(j in 1:2){
    constraints[[paste0('intercept.', i, '_', j)]] <- 
      sv$parnum[sv$name == paste0('d',j) & (sv$item %in% itemnames[pick + i]) & sv$est]
  }
}
mod2 <- bfactor(dat, itemloadings, model, constrain=constraints, quadpts=9, pars=sv, 
                optimizer = 'nlminb')
coef(mod2, simplify=TRUE)
coef(mod2)$GroupPars[,c('MEAN_1', 'MEAN_2', 'COV_11', 'COV_21', 'COV_22')]
#save scores
scores_com <- data.frame(fscores(mod2))

head(scores_com)
             F1           F2            F3           F4            F5            F6           F7            F8
1  1.297257e-15 2.266489e-15 -2.352151e-28 6.485141e-22 -4.713927e-13 -2.898849e-08 1.651152e-17 -1.561585e-19
2  1.683215e-07 1.024281e-12 -1.720596e-22 7.279179e-22  5.765951e-14 -5.446999e-08 1.651151e-17  7.403599e-19
3 -3.582314e-10 7.792545e-10  1.455839e-21 6.485094e-22  5.765951e-14 -2.898849e-08 1.651168e-17 -1.561585e-19
4  7.642004e-05 4.196115e-10 -1.191132e-22 6.882208e-22  5.765878e-14  7.185317e-08 1.651131e-17  7.403069e-19
5  2.107903e-07 1.257415e-12 -1.852903e-22 6.485126e-22  5.765951e-14 -2.898850e-08 1.651160e-17  7.403599e-19


I was waiting for a table with only 3 columns (year 1, year 2, year 3).
The raw data (in case you want to check it): https://www.dropbox.com/s/llrea46tdckfe38/mydata.txt?dl=0

Thanks a lot for always helping us.


Phil Chalmers

unread,
Nov 3, 2017, 8:06:38 PM11/3/17
to Cursos Psi, mirt-package
Hi Cursos,

The code looks okay to me, though I have not tested it. My only major comment would be to use the 'MAP' estimator for fscores() to obtain point estimates that are not influenced by numerical integration. Regarding your question, I'm not quite sure why you are looking for a table with 3 columns. The model you've fit is a latent growth curve model, so the first 2 latent traits saved from fscores() represent the latent intercept and linear slope parameters for each participant. 

Phil

--
You received this message because you are subscribed to the Google Groups "mirt-package" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mirt-package+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Cursos Psi

unread,
Nov 8, 2017, 4:20:02 PM11/8/17
to mirt-package
Dear Professor Phil, as always you are very kind and supportive. Thanks.

Besides your answer, I need to clarify my question because my research team didn't understand the results displayed. We evaluate a group of 4,424 participants in 3 consecutive years. In other words, the same participant was assessed during year 1,2 and 3.

We used an unidimensional scale to measure the communication ability and this scale has 3 categories (never, sometimes and always). Initially, we modeled the results using 3 different Graded Response Model for each year: the first GRM was using the first year results, the second one was using the second year and the third one was using the third year results.

Unfortunately, we realized we could not compare the three results because we were not considering the previous result to estimate. Because of that we are trying to run a Growth model!

What we want to see is if their ability to communicate is growing. I think it is, but we need to confirm that using IRT. The last output returns to us a dataframe with 8 columns (F1,F2,...,F8) and we cannot understand that as slope and intercept.

I know you are have just a limited time to help us in this community and I'll be happy if you could help us with any literature or suggestion.

Thanks much!



Phil

To unsubscribe from this group and stop receiving emails from it, send an email to mirt-package...@googlegroups.com.

Alvin

unread,
Dec 20, 2017, 3:00:43 PM12/20/17
to mirt-package
Hi Phil,
Is the latent growth curve approach in https://philchalmers.github.io/mirt/html/Longitudinal-IRT.html the same or similar to the approach by Embretson -- visually the model in Figure 3 (page 7) here? https://bearcenter.berkeley.edu/sites/default/files/Wilson%20%237.pdf
Thanks,
Alvin

Phil

To unsubscribe from this group and stop receiving emails from it, send an email to mirt-package...@googlegroups.com.

Phil Chalmers

unread,
Dec 22, 2017, 1:07:42 AM12/22/17
to Alvin, mirt-package
Hi Alvin,

Yes, the growth curve model example here appears to be very similar. Cheers.

Phil

To unsubscribe from this group and stop receiving emails from it, send an email to mirt-package+unsubscribe@googlegroups.com.

Martin Lacher

unread,
May 2, 2024, 5:17:09 AMMay 2
to mirt-package
I would very much appreciate to have an answer to the question asked in this post, it seems open since 2017: What is the content of the 8 columns F1 to F8? Is there any detailed documentation about Growth models in mirt?

Thanks a lot, Martin
Reply all
Reply to author
Forward
0 new messages