immer_jml: Joint Maximum Likelihood Estimation for the Partial Credit...

View source: R/immer_jml.R

immer_jmlR Documentation

Joint Maximum Likelihood Estimation for the Partial Credit Model with a Design Matrix for Item Parameters and \varepsilon-Adjustment Bias Correction

Description

Estimates the partial credit model with a design matrix for item parameters with joint maximum likelihood (JML). The \varepsilon-adjustment bias correction is implemented with reduces bias of the JML estimation method (Bertoli-Barsotti, Lando & Punzo, 2014).

Usage

immer_jml(dat, A=NULL, maxK=NULL, center_theta=TRUE, b_fixed=NULL, weights=NULL,
     irtmodel="PCM", pid=NULL, rater=NULL, eps=0.3, est_method="eps_adj", maxiter=1000,
     conv=1e-05, max_incr=3, incr_fac=1.1, maxiter_update=10, maxiter_line_search=6,
     conv_update=1e-05, verbose=TRUE, use_Rcpp=TRUE, shortcut=TRUE)

## S3 method for class 'immer_jml'
summary(object, digits=3, file=NULL, ...)

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

## S3 method for class 'immer_jml'
IRT.likelihood(object, theta=seq(-9,9,len=41), ...)

Arguments

dat

Data frame with polytomous item responses 0,1,…, K

A

Design matrix (items \times categories \times basis parameters). Entries for categories are for 1,…,K

maxK

Optional vector with maximum category per item

center_theta

Logical indicating whether the trait estimates should be centered

b_fixed

Matrix with fixed b parameters

irtmodel

Specified item response model. Can be one of the two partial credit model parametrizations PCM and PCM2.

weights

Optional vector of sampling weights

pid

Person identifier

rater

Optional rater identifier

eps

Adjustment parameter \varepsilon

est_method

Estimation method. Can be 'eps_adj' for the \varepsilon-adjustment, 'jml' for the JML without bias correction and 'jml_bc' for JML with bias correction.

maxiter

Maximum number of iterations

conv

Convergence criterion

max_incr

Maximum increment

incr_fac

Factor for shrinking increments from max_incr in every iteration

maxiter_update

Maximum number of iterations for parameter updates

maxiter_line_search

Maximum number of iterations within line search

conv_update

Convergence criterion for updates

verbose

Logical indicating whether convergence progress should be displayed

use_Rcpp

Logical indicating whether Rcpp package should be used for computation.

shortcut

Logical indicating whether a computational shortcut should be used for efficiency reasons

object

Object of class immer_jml

digits

Number of digits after decimal to print

file

Name of a file in which the output should be sunk

theta

Grid of θ values

...

Further arguments to be passed.

Details

The function uses the partial credit model as P(X_i=h | θ ) \propto \exp( h θ - b_{ih} ) with b_{ih}=∑_l a_{ihl} ξ_l where the values a_{ihl} are included in the design matrix A and ξ_l denotes basis item parameters.

The adjustment parameter \varepsilon is applied to the sum score as the sufficient statistic for the person parameter. In more detail, extreme scores S_p=0 (minimum score) or S_p=M_p (maximum score) are adjusted to S_p^\ast=\varepsilon or S_p^\ast=M_p - \varepsilon, respectively. Therefore, the adjustment possesses more influence on parameter estimation for datasets with a small number of items.

Value

List with following entries

b

Item parameters b_{ih}

theta

Person parameters

theta_se

Standard errors for person parameters

xsi

Basis parameters

xsi_se

Standard errors for bias parameters

probs

Predicted item response probabilities

person

Data frame with person scores

dat_score

Scoring matrix

score_pers

Sufficient statistics for persons

score_items

Sufficient statistics for items

loglike

Log-likelihood value

References

Bertoli-Barsotti, L., Lando, T., & Punzo, A. (2014). Estimating a Rasch Model via fuzzy empirical probability functions. In D. Vicari, A. Okada, G. Ragozini & C. Weihs (Eds.). Analysis and Modeling of Complex Data in Behavioral and Social Sciences, Springer.

See Also

See TAM::tam.jml for joint maximum likelihood estimation. The varepsilon-adjustment is also implemented in sirt::mle.pcm.group.

Examples

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

data(data.read, package="sirt")
dat <- data.read

#---  Model 1: Rasch model with JML and epsilon-adjustment
mod1a <- immer::immer_jml(dat)
summary(mod1a)

## Not run: 
#- JML estimation, only handling extreme scores
mod1b <- immer::immer_jml( dat, est_method="jml")
summary(mod1b)

#- JML estimation with (I-1)/I bias correction
mod1c <- immer::immer_jml( dat, est_method="jml_bc" )
summary(mod1c)

# compare different estimators
round( cbind( eps=mod1a$xsi, JML=mod1b$xsi, BC=mod1c$xsi ), 2 )

#---  Model 2: LLTM by defining a design matrix for item difficulties
A <- array(0, dim=c(12,1,3) )
A[1:4,1,1] <- 1
A[5:8,1,2] <- 1
A[9:12,1,3] <- 1

mod2 <- immer::immer_jml(dat, A=A)
summary(mod2)

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

library(TAM)
data(data.gpcm, package="TAM")
dat <- data.gpcm

#-- JML estimation in TAM
mod0 <- TAM::tam.jml(resp=dat, bias=FALSE)
summary(mod0)

# extract design matrix
A <- mod0$A
A <- A[,-1,]

#-- JML estimation
mod1 <- immer::immer_jml(dat, A=A, est_method="jml")
summary(mod1)

#-- JML estimation with epsilon-adjusted bias correction
mod2 <- immer::immer_jml(dat, A=A, est_method="eps_adj")
summary(mod2)

#############################################################################
# EXAMPLE 3: Rating scale model with raters | Use design matrix from TAM
#############################################################################

data(data.ratings1, package="sirt")
dat <- data.ratings1

facets <- dat[,"rater", drop=FALSE]
resp <- dat[,paste0("k",1:5)]

#* Model 1: Rating scale model in TAM
formulaA <- ~ item + rater + step
mod1 <- TAM::tam.mml.mfr(resp=resp, facets=facets, formulaA=formulaA,
                pid=dat$idstud)
summary(mod1)

#* Model 2: Same model estimated with JML
resp0 <- mod1$resp
A0 <- mod1$A[,-1,]
mod2 <- immer::immer_jml(dat=resp0, A=A0, est_method="eps_adj")
summary(mod2)

## End(Not run)

immer documentation built on Aug. 22, 2022, 5:05 p.m.