Learn R Programming

mirt (version 1.27.1)

estfun.AllModelClass: Extract Empirical Estimating Functions

Description

A function for extracting the empirical estimating functions of a fitted mirt, multipleGroup or bfactor model. This is the derivative of the log-likelihood with respect to the parameter vector, evaluated at the observed (case-wise) data. In other words, this function returns the case-wise scores, evaluated at the fitted model parameters. Currently, models fitted via the EM or BL method are supported. For the computations, the internal Theta grid of the model is being used which was already used during the estimation of the model itself along with its matching normalized density.

Usage

estfun.AllModelClass(object)

Arguments

object

a fitted model object of class SingleGroupClass or MultipleGroupClass

Value

An n x k matrix corresponding to n observations and k parameters

See Also

mirt, multipleGroup, bfactor

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
mod1 <- mirt(expand.table(LSAT7), 1, SE = TRUE, SE.type = "crossprod")
(sc1 <- estfun.AllModelClass(mod1))
colSums(sc1)
vc1 <- vcov(mod1)
all.equal(crossprod(sc1), chol2inv(chol(vc1)), check.attributes = FALSE)

group <- rep(c("G1", "G2"), 500)
mod2 <- multipleGroup(expand.table(LSAT7), 1, group, SE = TRUE,
  SE.type = "crossprod")
(sc2 <- estfun.AllModelClass(mod2))
colSums(sc2)
vc2 <- vcov(mod2)
all.equal(crossprod(sc2), chol2inv(chol(vc2)), check.attributes = FALSE)

# }

Run the code above in your browser using DataLab