Learn R Programming

mirt (version 0.4.2)

confmirt: Confirmatory Full-Information Item Factor Analysis

Description

confmirt fits a conditional (i.e., confirmatory) full-information maximum-likelihood factor analysis model to dichotomous and polytomous data under the item response theory paradigm using Cai's (2010) Metropolis-Hastings Robbins-Monro algorithm. Fits univariate and multivariate Rasch, 1-4PL, graded, (generalized) partial credit, nominal, multiple choice, and partially-compensatory models, potentially with polynomial and product constructed latent traits.

Usage

confmirt(data, model, itemtype = NULL, guess = 0, upper =
    1, pars = NULL, constrain = NULL, parprior = NULL,
    grsm.block = NULL, verbose = TRUE, draws = 2000, debug
    = FALSE, rotate = 'varimax', Target = NULL, D = 1.702,
    technical = list(), ...)

## S3 method for class 'ConfirmatoryClass': summary(object, suppress = 0, digits = 3, verbose = TRUE, ...)

## S3 method for class 'ConfirmatoryClass': coef(object, digits = 3, ...)

## S3 method for class 'ConfirmatoryClass': anova(object, object2)

## S3 method for class 'ConfirmatoryClass': fitted(object, digits = 3, ...)

## S3 method for class 'ConfirmatoryClass': plot(x, y, type = 'info', npts = 50, theta_angle = 45, rot = list(xaxis = -70, yaxis = 30, zaxis = 10), ...)

## S3 method for class 'ConfirmatoryClass': residuals(object, restype = 'LD', digits = 3, df.p = FALSE, printvalue = NULL, verbose = TRUE, ...)

Arguments

data
a matrix or data.frame that consists of numerically ordered data, with missing data coded as NA
model
an object returned from confmirt.model() declaring how the factor model is to be estimated, or a single numeric value indicating the number of exploratory factors to estimate. See confmirt.
guess
initial (or fixed) values for the pseudo-guessing parameter. Can be entered as a single value to assign a global guessing parameter or may be entered as a numeric vector for each item
upper
initial (or fixed) upper bound parameters for 4-PL model. Can be entered as a single value to assign a global upper bound parameter or may be entered as a numeric vector corresponding to each item
printvalue
a numeric value to be specified when using the res='exp' option. Only prints patterns that have standardized residuals greater than abs(printvalue). The default (NULL) prints all response patterns
verbose
logical; display iteration history during estimation?
draws
the number of Monte Carlo draws to estimate the log-likelihood
restype
type of residuals to be displayed. Can be either 'LD' for a local dependence matrix (Chen & Thissen, 1997) or 'exp' for the expected values for the frequencies of every response pattern
itemtype
type of items to be modeled, declared as a vector for each item or a single value which will be repeated globally. The NULL default assumes that the items follow a graded or 2PL structure, however they may be changed to the following: 'Rasch', '1P
grsm.block
an optional numeric vector indicating where the blocking should occur when using the grsm, NA represents items that do not belong to the grsm block (other items that may be estimated in the test data). For example, to specify two blocks of 3 with
constrain
a list of user declared equality constraints. To see how to define the parameters correctly use pars = 'values' initially to see how the parameters are labeled. To constrain parameters to be equal create a list with separate concatena
parprior
a list of user declared prior item probabilities. To see how to define the parameters correctly use pars = 'values' initially to see how the parameters are labeled. Can define either normal (normally for slopes and intercepts) or beta
pars
a data.frame with the structure of how the starting values, parameter numbers, and estimation logical values are defined. The user may observe how the model defines the values by using pars = 'values', and this object can in turn be m
debug
logical; turn on debugging features?
object
an object of class ConfirmatoryClass
object2
an object of class ConfirmatoryClass
digits
the number of significant digits to be rounded
rotate
if model is numeric (indicating an exploratory item FA) then this rotation is used. Default is 'varimax'
Target
a dummy variable matrix indicting a target rotation pattern
suppress
a numeric value indicating which factor loadings should be suppressed. Typical values are around .3 in most statistical software. Default is 0 for no suppression
D
a numeric value used to adjust the logistic metric to be more similar to a normal cumulative density curve. Default is 1.702
technical
list specifying subtle parameters that can be adjusted. These values are
df.p
logical; print the degrees of freedom and p-values?
x
an object of class mirt to be plotted or printed
y
an unused variable to be ignored
type
type of plot to view; can be 'info' to show the test information function, 'infocontour' for the test information contours, or 'SE' for the test standard error function
theta_angle
numeric values ranging from 0 to 90 used in plot. If a vector is used then a bubble plot is created with the summed information across the angles specified (e.g., theta_angle = seq(0, 90, by=10))
npts
number of quadrature points to be used for plotting features. Larger values make plots look smoother
rot
allows rotation of the 3D graphics [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
...
additional arguments to be passed

Convergence

The MHRM algorithm often is more stable than the EM counterpart in mirt but convergence of the algorithm should be interpreted with caution. When the number of iterations grows very high (e.g., greater than 1500) or when Max Change = .2500 values are repeatedly printed to the console too often (indicating that the parameters were being constrained since they are naturally moving in steps greater than 0.25) then the model may either be ill defined or have a very flat likelihood surface, and genuine maximum likelihood parameter estimates may be difficult to find.

Confirmatory IRT

Specification of the confirmatory item factor analysis model follows many of the rules in the SEM framework for confirmatory factor analysis. The variances of the latent factors are automatically fixed to 1 to help facilitate model identification. All parameters may be fixed to constant values or set equal to other parameters using the appropriate declarations.

Exploratory IRT

Specifying a number as the second input to confmirt an exploratory IRT model is estimated and can be viewed as a stochastic analogue of mirt, with much of the same behaviour and specifications. Rotation and target matrix options will be used in this subroutine and will be passed to the returned object for use in generic functions such as summary() and fscores. Again, factor means and variances are fixed to ensure proper identification. See mirt for more details.

Details

confmirt follows a confirmatory and exploratory item factor analysis strategy that uses a stochastic version of maximum likelihood estimation described by Cai (2010a, 2010b). The general equation used for multidimensional item response theory in this function 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 (2003) and POLYFACT. Missing data are treated as 'missing at random' so that each response vector is included in the estimation (i.e., full-information). 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. For computing the log-likelihood more accurately see calcLogLik.

coef displays the item parameters with their associated standard errors, while use of summary transforms the slopes into a factor loadings metric and if the model is exploratory allows for rotating the parameters. Also, nested models may be compared by using the anova function, where a Chi-squared difference test and AIC/BIC difference values are displayed.

References

Cai, L. (2010a). High-Dimensional exploratory item factor analysis by a Metropolis-Hastings Robbins-Monro algorithm. Psychometrika, 75, 33-57.

Cai, L. (2010b). Metropolis-Hastings Robbins-Monro algorithm for confirmatory item factor analysis. Journal of Educational and Behavioral Statistics, 35, 307-335.

Chalmers, R., P. (2012). mirt: A Multidimensional Item Response Theory Package for the R Environment. Journal of Statistical Software, 48(6), 1-29.

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.

See Also

expand.table, key2binary, simdata, fscores, confmirt.model, wald, multipleGroup, itemplot

Examples

Run this code
#Exploratory model estimation, similar to mirt()
data(LSAT7)
fulldata <- expand.table(LSAT7)
(mod1 <- confmirt(fulldata, 1))

#Confirmatory models

#simulate data
a <- matrix(c(
1.5,NA,
0.5,NA,
1.0,NA,
1.0,0.5,
 NA,1.5,
 NA,0.5,
 NA,1.0,
 NA,1.0),ncol=2,byrow=TRUE)

d <- matrix(c(
-1.0,NA,NA,
-1.5,NA,NA,
 1.5,NA,NA,
 0.0,NA,NA,
3.0,2.0,-0.5,
2.5,1.0,-1,
2.0,0.0,NA,
1.0,NA,NA),ncol=3,byrow=TRUE)

sigma <- diag(2)
sigma[1,2] <- sigma[2,1] <- .4
items <- c(rep('dich',4), rep('graded',3), 'dich')
dataset <- simdata(a,d,2000,items,sigma)

#analyses
#CIFA for 2 factor crossed structure

model.1 <- confmirt.model()
  F1 = 1-4
  F2 = 4-8
  COV = F1*F2


mod1 <- confmirt(dataset,model.1)
coef(mod1)
summary(mod1)
residuals(mod1)

#####
#bifactor
model.3 <- confmirt.model()
  G = 1-8
  F1 = 1-4
  F2 = 5-8


mod3 <- confmirt(dataset,model.3)
coef(mod3)
summary(mod3)
residuals(mod3)
anova(mod1,mod3)

#####
#polynomial/combinations
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))

model.quad <- confmirt.model()
       F1 = 1-32
  (F1*F1) = 1-32


model.combo <- confmirt.model()
       F1 = 1-16
       F2 = 17-32
  (F1*F2) = 1-8


(mod.quad <- confmirt(data, model.quad))
(mod.combo <- confmirt(data, model.combo))
anova(mod.quad, mod.combo)

Run the code above in your browser using DataLab