Learn R Programming

CDM (version 7.4-19)

IRT.jackknife: Jackknifing an Item Response Model

Description

This function performs a Jackknife procedure for estimating standard errors for an item response model. The replication design must be defined by IRT.repDesign. Model fit is also assessed via Jackknife.

Statistical inference for derived parameters is performed by IRT.derivedParameters with a fitted object of class IRT.jackknife and a list with defining formulas.

Usage

IRT.jackknife(object,repDesign, ... )

IRT.derivedParameters(jkobject, derived.parameters )

# S3 method for gdina IRT.jackknife(object, repDesign, …)

# S3 method for IRT.jackknife coef(object, bias.corr=FALSE, …)

# S3 method for IRT.jackknife vcov(object, …)

Arguments

object

Objects for which S3 method IRT.jackknife is defined.

repDesign

Replication design generated by IRT.repDesign.

jkobject

Object of class IRT.jackknife.

derived.parameters

List with defined derived parameters (see Example 2, Model 2).

bias.corr

Optional logical indicating whether a bias correction should be employed.

Further arguments to be passed.

Value

List with following entries

jpartable

Parameter table with Jackknife estimates

parsM

Matrix with replicated statistics

vcov

Variance covariance matrix of parameters

Examples

Run this code
# NOT RUN {
library(BIFIEsurvey)

#############################################################################
# EXAMPLE 1: Multiple group DINA model with TIMSS data | Cluster sample
#############################################################################

data(data.timss11.G4.AUT.part, package="CDM")

dat <- data.timss11.G4.AUT.part$data
q.matrix <- data.timss11.G4.AUT.part$q.matrix2
# extract items
items <- paste(q.matrix$item)

# generate replicate design
rdes <- CDM::IRT.repDesign( data=dat,  wgt="TOTWGT", jktype="JK_TIMSS",
                   jkzone="JKCZONE", jkrep="JKCREP" )

#--- Model 1: fit multiple group GDINA model
mod1 <- CDM::gdina( dat[,items], q.matrix=q.matrix[,-1],
            weights=dat$TOTWGT, group=dat$female +1  )
# jackknife Model 1
jmod1 <- CDM::IRT.jackknife( object=mod1, repDesign=rdes )
summary(jmod1)
coef(jmod1)
vcov(jmod1)

#############################################################################
# EXAMPLE 2: DINA model | Simple random sampling
#############################################################################

data(sim.dina, package="CDM")
data(sim.qmatrix, package="CDM")
dat <- sim.dina
q.matrix <- sim.qmatrix

# generate replicate design with 50 jackknife zones (50 random groups)
rdes <- CDM::IRT.repDesign( data=dat,  jktype="JK_RANDOM", ngr=50 )

#--- Model 1: DINA model
mod1 <- CDM::gdina( dat, q.matrix=q.matrix, rule="DINA")
summary(mod1)
# jackknife DINA model
jmod1 <- CDM::IRT.jackknife( object=mod1, repDesign=rdes )
summary(jmod1)

#--- Model 2: DINO model
mod2 <- CDM::gdina( dat, q.matrix=q.matrix, rule="DINO")
summary(mod2)
# jackknife DINA model
jmod2 <- CDM::IRT.jackknife( object=mod2, repDesign=rdes )
summary(jmod2)
IRT.compareModels( mod1, mod2 )

# statistical inference for derived parameters
derived.parameters <- list( "skill1"=~ 0 + I(prob_skillV1_lev1_group1),
    "skilldiff12"=~ 0 + I( prob_skillV2_lev1_group1 - prob_skillV1_lev1_group1 ),
    "skilldiff13"=~ 0 + I( prob_skillV3_lev1_group1 - prob_skillV1_lev1_group1 )
                    )
jmod2a <- CDM::IRT.derivedParameters( jmod2, derived.parameters=derived.parameters )
summary(jmod2a)
coef(jmod2a)
# }

Run the code above in your browser using DataLab