A generic function to extract the internal objects from any estimated model. If possible, the function will returns a vector/scalar containing the desired elements, otherwise it will return a list.
extract.mirt(x, what)mirt model of class 'SingleGroupClass', 'MultipleGroupClass', 'MixedClass' or 'DiscreteGroupClass'
a character vector indicating what to extract. Can contain more than one element
Objects which can be extracted from mirt objects include:
observed log-likelihood
log term contributed by prior parameter distributions
goodness of fit statistic
degrees of freedom
p-value for G2 statistic
root mean-square error of approximation based on G2
CFI fit statistic
TLI fit statistic
AIC
corrected AIC
BIC
sample size adjusted BIC
DIC
unrotated standardized loadings matrix
factor communality estimates
EM log-likelihood history
a tabular version of the raw response data input. Frequencies are stored
in freq
frequencies associated with tabdata
an integer vector indicating the number of unique elements for each item
similar to tabdata, however the responses have been transformed into
dummy coded variables
analogous to tabdatafull, but for the raw input data instead of the
tabulated frequencies
expected probability of the unique response patterns
a logical value indicating whether the model terminated within the convergence criteria
number of iterations it took to reach the convergence criteria
number of freely estimated parameters
vector containing uniquely estimated parameters
parameter covariance matrix (associated with parvec)
the condition number of the Hessian (if computed). Otherwise NA
prior density distribution for the latent traits
number of latent traits/factors
a logical indicating whether the model passed the second-order test based on the Hessian matrix. Indicates whether model is a potential local maximum solution
estimation time, broken into different sections
# NOT RUN {
# }
# NOT RUN {
mod <- mirt(Science, 1)
extract.mirt(mod, 'logLik')
extract.mirt(mod, c('G2', 'df', 'p'))
extract.mirt(mod, c('F', 'h2'))
# }
Run the code above in your browser using DataLab