bfactor
fits a confirmatory maximum likelihood
bi-factor model to dichotomous and polytomous data under
the item response theory paradigm. Fits univariate and
multivariate 1-4PL, graded, (generalized) partial credit,
nominal, and multiple choice models using a dimensional
reduction EM algorithm so that regardless of the number
of specific factors estimated the model only uses a
two-dimensional quadrature grid for integration.bfactor(data, specific, itemtype = NULL, guess = 0, upper
= 1, SE = FALSE, startvalues = NULL, constrain = NULL,
freepars = NULL, parprior = NULL, prev.cor = NULL,
quadpts = 20, verbose = FALSE, debug = FALSE, technical
= list(), ...) ## S3 method for class 'bfactor':
summary(object, digits = 3, ...)
## S3 method for class 'bfactor':
coef(object, allpars = FALSE, digits
= 3)
## S3 method for class 'bfactor':
fitted(object, digits = 3, ...)
## S3 method for class 'bfactor':
residuals(object, restype = 'LD',
digits = 3, printvalue = NULL, ...)
matrix
or data.frame
that
consists of numerically ordered data, with missing data
coded as NA
res='exp'
option. Only prints patterns
that have standardized residuals greater than
abs(printvalue)
. The default (NULL) prints all
response patternsncol(data)
.constrain = 'index'
initially to see
how the parameters are labeled. To constrain parameters
to be equal create a list with separate concaparprior = 'index'
initially to see
how the parameters are labeled. Can define either normal
(normally for slopes and intercepts) or bfreepars =
'index'
initially to see how the parameters are labeled.
These values may be modified and inpstartvalues = 'index'
initially to
see what the defaults would noramlly be. These values may
be modified and input back into the fubfactor
of
class bfactorClass
'LD'
for a local dependence matrix (Chen &
Thissen, 1997) or 'exp'
for the expected values
for the frequencies of every response patternbfactor
follows the item factor analysis strategy
explicated by Gibbons and Hedeker (1992) and Gibbons et
al. (2007). Nested models may be compared via an
approximate chi-squared difference test or by a reduction
in AIC or BIC (accessible via anova
); note
that this only makes sense when comparing class
bfactorClass
models to class mirtClass
or
polymirtClass
. The general equation used for item
bi-factor analysis in this package is in the logistic
form with a scaling correction of 1.702. This correction
is applied to allow comparison to mainstream programs
such as TESTFACT 4 (2003) and POLYFACT.Unlike TESTFACT 4 (2003) initial start values are computed by using information from a quasi-tetrachoric correlation matrix, potentially with Carroll's (1945) adjustment for chance responses. To begin, a MINRES factor analysis with one factor is extracted, and the transformed loadings and intercepts (see mirt for more details) are used as starting values for the general factor loadings and item intercepts. Values for the specific factor loadings are taken to be half the magnitude of the extracted general factor loadings. Note that while the sign of the loading may be incorrect for specific factors (and possibly for some of the general factor loadings) the intercepts and general factor loadings will be relatively close to the final solution. These initial values should be an improvement over the TESTFACT initial starting values of 1.414 for all the general factor slopes, 1 for all the specific factor slopes, and 0 for all the intercepts.
Factor scores are estimated assuming a normal prior
distribution and can be appended to the input data matrix
(full.scores = TRUE
) or displayed in a summary
table for all the unique response patterns. Fitted and
residual values can be observed by using the
fitted
and residuals
functions. To examine
individuals item plots use itemplot
which
will also plot information and surface functions.
Residuals are computed using the LD statistic (Chen &
Thissen, 1997) in the lower diagonal of the matrix
returned by residuals
, and Cramer's V above the
diagonal.
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
Carroll, J. B. (1945). The effect of difficulty and chance success on correlations between items and between tests. Psychometrika, 26, 347-372.
Wood, R., Wilson, D. T., Gibbons, R. D., Schilling, S. G., Muraki, E., & Bock, R. D. (2003). TESTFACT 4 for Windows: Test Scoring, Item Statistics, and Full-information Item Factor Analysis [Computer software]. Lincolnwood, IL: Scientific Software International.
expand.table
, key2binary
,
confmirt
, fscores
###load SAT12 and compute bifactor model with 3 specific factors
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))
specific <- c(2,3,2,3,3,2,1,2,1,1,1,3,1,3,1,2,1,1,3,3,1,1,3,1,3,3,1,3,2,3,1,2)
mod1 <- bfactor(data, specific)
coef(mod1)
###Try with fixed guessing parameters added
guess <- rep(.1,32)
mod2 <- bfactor(data, specific, guess = guess)
coef(mod2)
#########
#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)
Run the code above in your browser using DataLab