irtc.mml: Marginal Maximum Likelihood Estimation of Fixed-Slope Item...

View source: R/irtc.mml.R

irtc.mmlR Documentation

Marginal Maximum Likelihood Estimation of Fixed-Slope Item Response Models

Description

Estimates unidimensional and multidimensional fixed-slope item response models by marginal maximum likelihood (MML). Supported models include the Rasch / 1PL model, the partial credit model ("PCM", "PCM2") and the rating scale model ("RSM"). Latent regression on covariates, multiple groups, case weights and user-specified design matrices are supported.

Usage

irtc.mml(resp, Y = NULL, group = NULL, irtmodel = "1PL",
   formulaY = NULL, dataY = NULL, ndim = 1, pid = NULL,
   xsi.fixed = NULL, xsi.inits = NULL, beta.fixed = NULL, beta.inits = NULL,
   variance.fixed = NULL, variance.inits = NULL, est.variance = TRUE,
   constraint = "cases", A = NULL, B = NULL, B.fixed = NULL, Q = NULL,
   est.slopegroups = NULL, E = NULL, pweights = NULL,
   userfct.variance = NULL, variance.Npars = NULL, item.elim = TRUE,
   verbose = TRUE, control = list())

## S3 method for class 'irtc'
summary(object, file = NULL, ...)

## S3 method for class 'irtc'
print(x, ...)

## S3 method for class 'irtc'
logLik(object, ...)

## S3 method for class 'irtc'
anova(object, ...)

Arguments

resp

A data frame or matrix of polytomous or dichotomous item responses. Missing responses are coded NA.

Y

An optional matrix of covariates for the latent regression.

group

An optional vector of integer group identifiers for multiple-group estimation.

irtmodel

The estimated item response model. One of "1PL", "PCM", "PCM2" or "RSM".

formulaY

An optional formula for the latent regression in conjunction with dataY.

dataY

An optional data frame of covariates used together with formulaY.

ndim

The number of latent dimensions (used when no Q or B is supplied).

pid

An optional vector of person identifiers.

xsi.fixed

An optional matrix with two columns for fixing item parameters: parameter index and fixed value.

xsi.inits

An optional matrix of initial item parameter values.

beta.fixed

An optional matrix for fixing regression coefficients, or FALSE to estimate all.

beta.inits

An optional matrix of initial regression coefficients.

variance.fixed

An optional matrix for fixing entries of the covariance matrix.

variance.inits

An optional initial covariance matrix.

est.variance

Logical: should the covariance matrix be estimated?

constraint

Identification constraint, either "cases" or "items".

A

An optional design array for the item intercepts.

B

An optional design array for the (fixed) item slopes / scoring.

B.fixed

An optional matrix for fixing entries of the loading array B.

Q

An optional loading (Q-) matrix mapping items to dimensions.

est.slopegroups

An optional vector grouping items with common slope design (advanced use).

E

An optional design array used together with est.slopegroups.

pweights

An optional vector of person (case) weights.

userfct.variance

An optional user function imposing constraints on the covariance matrix.

variance.Npars

The number of estimated parameters in a user-constrained covariance matrix.

item.elim

Logical: should items with no observed responses in a category be eliminated?

verbose

Logical: print progress during estimation?

control

A list of control arguments for the estimation (e.g. maxiter, conv, snodes, nodes). Performance-related elements: n_threads (threads for the parallel E-step; default and maximum = 2), fast (logical, default FALSE; opt-in approximate mode that prunes negligible-weight quadrature nodes), and fast_threshold (pruning cutoff, default 1e-6).

object, x

An object of class irtc as produced by irtc.mml.

file

An optional file name; if supplied, summary output is written there.

...

Further arguments passed to methods.

Value

An object of class irtc, a list with (among others) the components:

xsi

A data frame of estimated item parameters and standard errors.

beta

The estimated latent regression coefficients.

variance

The estimated covariance matrix of the latent dimensions.

person

A data frame of person parameter estimates (EAP) and related statistics.

EAP.rel

The EAP reliability per dimension.

deviance

The deviance (-2 \log L) at the solution.

ic

A list of information criteria (AIC, BIC, ...).

CALL

The matched call.

References

Adams, R. J., Wilson, M., & Wang, W. C. (1997). The multidimensional random coefficients multinomial logit model. Applied Psychological Measurement, 21(1), 1–23. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1177/0146621697211001")}

See Also

irtc.mml.2pl for models with estimated item slopes.

Examples


#############################################################################
# EXAMPLE 1: Unidimensional Rasch model
#############################################################################

data(data.sim.rasch)
mod1 <- irtc.mml(resp = data.sim.rasch)
summary(mod1)

#############################################################################
# EXAMPLE 2: Partial credit model
#############################################################################

data(data.gpcm)
mod2 <- irtc.mml(resp = data.gpcm, irtmodel = "PCM")
summary(mod2)


IRTC documentation built on July 24, 2026, 5:07 p.m.