Learn R Programming

mirt (version 1.1)

calcLogLik: Monte Carlo Log-Likelihood Calculation

Description

Calculates a new object that contain the Monte Carlo estimated observed log-likelihood values for mirt objects estimated with the MH-RM algorithm. Can be estimated in parallel automatically by defining a parallel object with mirtCluster.

Arguments

object
a model of class ConfirmatoryClass or ExploratoryClass
draws
the number of Monte Carlo draws
G2
logical; estimate the G2 model fit statistic?
...
parameters that are passed

Value

  • Returns an object with the log-likelihood and Monte Carlo standard errors, and (possibly) the G^2 and other model fit statistic if there is no missing data.

See Also

mirt, multipleGroup, mixedmirt

Examples

Run this code
# no parallel
mod1withLogLik <- calcLogLik(mod1, draws=5000)

#with parallel using detected number of cores
library(parallel)
mirtCluster(detectCores())
mod1withLogLik <- calcLogLik(mod1, draws=5000)

Run the code above in your browser using DataLab