mod2values {mirt}R Documentation

Convert an estimated mirt model to a data.frame

Description

Given an estimated model from any of mirt's model fitting functions this function will convert the model parameters into the design data frame of starting values and other parameter characteristics (similar to using the pars = 'values' for obtaining starting values).

Usage

mod2values(x)

Arguments

x

an estimated model x from the mirt package

Author(s)

Phil Chalmers rphilip.chalmers@gmail.com

References

Chalmers, R., P. (2012). mirt: A Multidimensional Item Response Theory Package for the R Environment. Journal of Statistical Software, 48(6), 1-29. doi:10.18637/jss.v048.i06

See Also

extract.mirt

Examples

## No test: 
dat <- expand.table(LSAT7)
mod <- mirt(dat, 1)
values <- mod2values(mod)
values
##    group   item     class   name parnum     value lbound ubound   est
## 1    all Item.1      dich     a1      1 0.9879254   -Inf    Inf  TRUE
## 2    all Item.1      dich      d      2 1.8560605   -Inf    Inf  TRUE
## 3    all Item.1      dich      g      3 0.0000000  0e+00      1 FALSE
## 4    all Item.1      dich      u      4 1.0000000  0e+00      1 FALSE
## 5    all Item.2      dich     a1      5 1.0808847   -Inf    Inf  TRUE
## 6    all Item.2      dich      d      6 0.8079786   -Inf    Inf  TRUE
## 7    all Item.2      dich      g      7 0.0000000  0e+00      1 FALSE
## 8    all Item.2      dich      u      8 1.0000000  0e+00      1 FALSE
## 9    all Item.3      dich     a1      9 1.7058006   -Inf    Inf  TRUE
## 10   all Item.3      dich      d     10 1.8042187   -Inf    Inf  TRUE
## 11   all Item.3      dich      g     11 0.0000000  0e+00      1 FALSE
## 12   all Item.3      dich      u     12 1.0000000  0e+00      1 FALSE
## 13   all Item.4      dich     a1     13 0.7651853   -Inf    Inf  TRUE
## 14   all Item.4      dich      d     14 0.4859966   -Inf    Inf  TRUE
## 15   all Item.4      dich      g     15 0.0000000  0e+00      1 FALSE
## 16   all Item.4      dich      u     16 1.0000000  0e+00      1 FALSE
## 17   all Item.5      dich     a1     17 0.7357980   -Inf    Inf  TRUE
## 18   all Item.5      dich      d     18 1.8545127   -Inf    Inf  TRUE
## 19   all Item.5      dich      g     19 0.0000000  0e+00      1 FALSE
## 20   all Item.5      dich      u     20 1.0000000  0e+00      1 FALSE
## 21   all  GROUP GroupPars MEAN_1     21 0.0000000   -Inf    Inf FALSE
## 22   all  GROUP GroupPars COV_11     22 1.0000000  1e-04    Inf FALSE
##    prior.type prior_1 prior_2
## 1        none     NaN     NaN
## 2        none     NaN     NaN
## 3        none     NaN     NaN
## 4        none     NaN     NaN
## 5        none     NaN     NaN
## 6        none     NaN     NaN
## 7        none     NaN     NaN
## 8        none     NaN     NaN
## 9        none     NaN     NaN
## 10       none     NaN     NaN
## 11       none     NaN     NaN
## 12       none     NaN     NaN
## 13       none     NaN     NaN
## 14       none     NaN     NaN
## 15       none     NaN     NaN
## 16       none     NaN     NaN
## 17       none     NaN     NaN
## 18       none     NaN     NaN
## 19       none     NaN     NaN
## 20       none     NaN     NaN
## 21       none     NaN     NaN
## 22       none     NaN     NaN
#use the converted values as starting values in a new model, and reduce TOL
mod2 <- mirt(dat, 1, pars = values, TOL=1e-5)

## End(No test)

[Package mirt version 1.40 Index]