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.
# no parallelmod1withLogLik <- calcLogLik(mod1, draws=5000)
#with parallel using detected number of coreslibrary(parallel)
mirtCluster(detectCores())
mod1withLogLik <- calcLogLik(mod1, draws=5000)