Question on Specifying Items Without Testlets in Bifactor Models with mirt

19 views
Skip to first unread message

Joseph Miller

unread,
Aug 1, 2025, 5:04:50 PMAug 1
to mirt-package

Hello mirt community,

I am working on fitting a bifactor (testlet) model using the bfactor() function in the mirt package. My dataset includes some items that belong to testlets (specific factors) and some items that should load only on the general factor (i.e., they do not belong to any testlet).

I understand that the specific argument is used to assign items to testlets by specifying a numeric vector where each number corresponds to a testlet. However, I am unsure about the best way to indicate items that do not belong to any testlet. Should I use 0, NA, or some other way in the specific vector? Are there any particular considerations or constraints I need to set for these items in the model syntax?

Here is a simplified example of my situation:

  • Items 1-4 belong to testlet 1

  • Items 5-8 belong to testlet 2

  • Items 9-12 do not belong to any testlet and should load only on the general factor

I would appreciate any advice or example code on the proper way to specify this in bfactor(), including how to handle items without testlets in the model definition or parameter constraints.

Thank you very much for your help!

Best regards,

Joe

Phil Chalmers

unread,
Oct 24, 2025, 2:54:49 PMOct 24
to Joseph Miller, mirt-package
Hi Joseph,

The typical way that I've set this up is to use NA placeholders for the specific factor input, though this isn't the only way. You could also specify the same model with the mirt.model() structure, like so:

library(mirt)
data(SAT12)
data <- key2binary(SAT12,
                   key = c(1,4,5,2,3,1,2,1,3,1,2,4,2,1,5,3,4,4,1,4,3,3,4,1,3,5,1,3,1,5,4,5))

# alternative model definition via ?mirt.model syntax
specific2 <- "S1 = 7,9,10,11,13,15,17,18,21,22,24,27,31
              S2 = 1,3,6,8,16,29,32
              S3 = 2,4,5,12,14,19,20,23,25,26,28,30"
mod2 <- bfactor(data, specific2)

# omit lots of specific factor loadings for S2 (only general)
specific3 <- "S1 = 7,9,10,11,13,15,17,18,21,22,24,27,31
              S2 = 1,3,6,8
              S3 = 2,4,5,12,14,19,20,23,25,26,28,30"
mod3 <- bfactor(data, specific3)
coef(mod3, simplify=TRUE)

HTH.

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...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/mirt-package/8a7d9f33-ba67-4c4a-9ac7-3d83265fc53en%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages