Learn R Programming

mirt (version 1.14)

extract.mirt: Extract various elements from estimated model objects

Description

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.

Usage

extract.mirt(x, what)

Arguments

x

mirt model of class 'SingleGroupClass', 'MultipleGroupClass', 'MixedClass' or 'DiscreteGroupClass'

what

a character vector indicating what to extract. Can contain more than one element

Details

Objects which can be extracted from mirt objects include:

logLik

observed log-likelihood

logPrior

log term contributed by prior parameter distributions

G2

goodness of fit statistic

df

degrees of freedom

p

p-value for G2 statistic

RMSEA

root mean-square error of approximation based on G2

CFI

CFI fit statistic

TLI

TLI fit statistic

AIC

AIC

AICc

corrected AIC

BIC

BIC

SABIC

sample size adjusted BIC

DIC

DIC

F

unrotated standardized loadings matrix

h2

factor communality estimates

LLhistory

EM log-likelihood history

tabdata

a tabular version of the raw response data input. Frequencies are stored in freq

freq

frequencies associated with tabdata

K

an integer vector indicating the number of unique elements for each item

tabdatalong

similar to tabdata, however the responses have been transformed into dummy coded variables

fulldatalong

analogous to tabdatafull, but for the raw input data instead of the tabulated frequencies

exp_resp

expected probability of the unique response patterns

converged

a logical value indicating whether the model terminated within the convergence criteria

iterations

number of iterations it took to reach the convergence criteria

nest

number of freely estimated parameters

parvec

vector containing uniquely estimated parameters

vcov

parameter covariance matrix (associated with parvec)

condnum

the condition number of the Hessian (if computed). Otherwise NA

Prior

prior density distribution for the latent traits

nfact

number of latent traits/factors

secondordertest

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

time

estimation time, broken into different sections

See Also

extract.group

Examples

Run this code
# 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