bfactor
fits a confirmatory maximum likelihood
two-tier/bifactor model to dichotomous and polytomous
data under the item response theory paradigm. The IRT
models are fit using a dimensional reduction EM algorithm
so that regardless of the number of specific factors
estimated the model only uses the number of factors in
the second-tier structure plus 1. For the bifactor model
the maximum number of dimensions is only 2 since the
second-tier only consists of a ubiquitous unidimensional
factor. See mirt
for appropriate methods to
be used on the objects returned from the estimation.bfactor(data, model, model2 = mirt.model(paste0('G = 1-',
ncol(data))), SE = FALSE, SE.type = 'SEM', group =
NULL, verbose = TRUE, ...)
matrix
or data.frame
that
consists of numerically ordered data, with missing data
coded as NA
mirt.model()
. By default the model will
fit a unidimensional model in the second-tier, and
therefore be equivalent to the bifactor modelmirt
for detailsmirt
for more
detailsbfactor
follows the item factor analysis strategy
explicated by Gibbons and Hedeker (1992), Gibbons et al.
(2007), and Cai (2010). Nested models may be compared via
an approximate chi-squared difference test or by a
reduction in AIC or BIC (accessible via
anova
). See mirt
for more
details regarding the IRT estimation approach used in
this package. The default is to use 21 quadrature for
each dimensions, but this can be over-written by passing
a quadpts = #} argument. Note: for multiple group two-tier analyses only the
second-tier means and variances should be freed since the
specific factors are not treated independently due to the
dimension reduction technique.
###Try with fixed guessing parameters added guess <- rep(.1,32) mod2 <- bfactor(data, specific, guess = guess) coef(mod2) anova(mod1, mod2)
## don't estimate specific factor for item 32 specific[32] <- NA mod3 <- bfactor(data, specific) anova(mod1, mod3)
# same, but decalred manually (not run) #sv <- mod2values(mod1) #sv$value[220] <- 0 #parameter 220 is the 32 items specific slope #sv$est[220] <- FALSE #mod3 <- bfactor(data, specific, pars = sv) #with excellent starting values
######### # mixed itemtype example
#simulate data a <- matrix(c( 1,0.5,NA, 1,0.5,NA, 1,0.5,NA, 1,0.5,NA, 1,0.5,NA, 1,0.5,NA, 1,0.5,NA, 1,NA,0.5, 1,NA,0.5, 1,NA,0.5, 1,NA,0.5, 1,NA,0.5, 1,NA,0.5, 1,NA,0.5),ncol=3,byrow=TRUE)
d <- matrix(c( -1.0,NA,NA, -1.5,NA,NA, 1.5,NA,NA, 0.0,NA,NA, 2.5,1.0,-1, 3.0,2.0,-0.5, 3.0,2.0,-0.5, 3.0,2.0,-0.5, 2.5,1.0,-1, 2.0,0.0,NA, -1.0,NA,NA, -1.5,NA,NA, 1.5,NA,NA, 0.0,NA,NA),ncol=3,byrow=TRUE) items <- rep('dich', 14) items[5:10] <- 'graded'
sigma <- diag(3) dataset <- simdata(a,d,2000,itemtype=items,sigma=sigma)
specific <- c(rep(1,7),rep(2,7)) simmod <- bfactor(dataset, specific) coef(simmod)
######### # Two-tier model
#simulate data a <- matrix(c( 0,1,0.5,NA,NA, 0,1,0.5,NA,NA, 0,1,0.5,NA,NA, 0,1,0.5,NA,NA, 0,1,0.5,NA,NA, 0,1,NA,0.5,NA, 0,1,NA,0.5,NA, 0,1,NA,0.5,NA, 1,0,NA,0.5,NA, 1,0,NA,0.5,NA, 1,0,NA,0.5,NA, 1,0,NA,NA,0.5, 1,0,NA,NA,0.5, 1,0,NA,NA,0.5, 1,0,NA,NA,0.5, 1,0,NA,NA,0.5),ncol=5,byrow=TRUE)
d <- matrix(rnorm(16)) items <- rep('dich', 16)
sigma <- diag(5) sigma[1,2] <- sigma[2,1] <- .4 set.seed(1234) dataset <- simdata(a,d,2000,itemtype=items,sigma=sigma)
specific <- c(rep(1,5),rep(2,6),rep(3,5)) model <- mirt.model(' G1 = 1-8 G2 = 9-16 COV = G1*G2')
simmod <- bfactor(dataset, specific, model, quadpts = 9, technical = list(TOL = 1e-3)) coef(simmod) summary(simmod)
Chalmers, R., P. (2012). mirt: A Multidimensional Item Response Theory Package for the R Environment. Journal of Statistical Software, 48(6), 1-29.
Gibbons, R. D., & Hedeker, D. R. (1992). Full-information Item Bi-Factor Analysis. Psychometrika, 57, 423-436.
Gibbons, R. D., Darrell, R. B., Hedeker, D., Weiss, D. J., Segawa, E., Bhaumik, D. K., Kupfer, D. J., Frank, E., Grochocinski, V. J., & Stover, A. (2007). Full-Information item bifactor analysis of graded response data. Applied Psychological Measurement, 31, 4-19
anova-method
, coef-method
,
summary-method
,
residuals-method
,
plot-method
, fitted-method
,
expand.table
, key2binary
,
mirt.model
, mirt
,
bfactor
, multipleGroup
,
mixedmirt
, wald
,
itemplot
, fscores
,
fitIndices
, extract.item
,
iteminfo
, testinfo
,
probtrace
, boot.mirt
,
imputeMissing
, itemfit
,
mod2values
, simdata
,
createItem