IRT.factor.scores: S3 Methods for Extracting Factor Scores (Person...

Description Usage Arguments Value See Also Examples

Description

This S3 method extracts factor scores or skill classifications.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
IRT.factor.scores(object, ...)

## S3 method for class 'din'
IRT.factor.scores(object, type="MLE", ...)

## S3 method for class 'gdina'
IRT.factor.scores(object, type="MLE", ...)

## S3 method for class 'mcdina'
IRT.factor.scores(object, type="MLE", ...)

## S3 method for class 'gdm'
IRT.factor.scores(object, type="EAP", ...)

## S3 method for class 'slca'
IRT.factor.scores(object, type="MLE", ...)

Arguments

object

Object of classes din, gdina, mcdina, gdm or slca.

type

Type of estimated factor score. This can be "MLE", "MAP" or "EAP". The type EAP cannot be used for objects of class slca.

...

More arguments to be passed.

Value

A matrix or a vector with classified scores.

See Also

For extracting the individual likelihood or the individual posterior see IRT.likelihood or IRT.posterior.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
#############################################################################
# EXAMPLE 1: Extracting factor scores in the DINA model
#############################################################################

data(sim.dina, package="CDM")
data(sim.qmatrix, package="CDM")

# estimate DINA model
mod1 <- CDM::din( sim.dina, q.matrix=sim.qmatrix)
summary(mod1)
# MLE
fsc1a <- CDM::IRT.factor.scores(mod1)
# MAP
fsc1b <- CDM::IRT.factor.scores(mod1, type="MAP")
# EAP
fsc1c <- CDM::IRT.factor.scores(mod1, type="EAP")
# compare classification for skill 1
stats::xtabs( ~ fsc1a[,1] + fsc1b[,1] )
graphics::boxplot( fsc1c[,1] ~ fsc1a[,1] )

Example output

Loading required package: mvtnorm
**********************************
** CDM 7.0-12 (2018-11-06 16:23:12)      
** Cognitive Diagnostic Models  **
**********************************

---------------------------------------------------------------------------------
DINA MODEL 
** 2018-11-21 04:30:10 
---------------------------------------------------------------------------------
Iter.  1  :  04:30:10 ,   loglike= -2195.186  / max. param. ch. :  0.210102  / relative deviance change :  1
Iter.  2  :  04:30:10 ,   loglike= -2060.39  / max. param. ch. :  0.074937  / relative deviance change :  0.065422
Iter.  3  :  04:30:10 ,   loglike= -2049.912  / max. param. ch. :  0.02769  / relative deviance change :  0.005112
Iter.  4  :  04:30:10 ,   loglike= -2046.37  / max. param. ch. :  0.011916  / relative deviance change :  0.001731
Iter.  5  :  04:30:10 ,   loglike= -2044.859  / max. param. ch. :  0.008072  / relative deviance change :  0.000739
Iter.  6  :  04:30:10 ,   loglike= -2044.123  / max. param. ch. :  0.006045  / relative deviance change :  0.00036
Iter.  7  :  04:30:10 ,   loglike= -2043.735  / max. param. ch. :  0.004925  / relative deviance change :  0.00019
Iter.  8  :  04:30:10 ,   loglike= -2043.515  / max. param. ch. :  0.004281  / relative deviance change :  0.000108
Iter.  9  :  04:30:10 ,   loglike= -2043.381  / max. param. ch. :  0.003898  / relative deviance change :  6.6e-05
Iter.  10  :  04:30:10 ,   loglike= -2043.292  / max. param. ch. :  0.003663  / relative deviance change :  4.3e-05
Iter.  11  :  04:30:10 ,   loglike= -2043.229  / max. param. ch. :  0.003515  / relative deviance change :  3.1e-05
Iter.  12  :  04:30:10 ,   loglike= -2043.18  / max. param. ch. :  0.00342  / relative deviance change :  2.4e-05
Iter.  13  :  04:30:10 ,   loglike= -2043.141  / max. param. ch. :  0.003357  / relative deviance change :  1.9e-05
Iter.  14  :  04:30:10 ,   loglike= -2043.107  / max. param. ch. :  0.003314  / relative deviance change :  1.6e-05
Iter.  15  :  04:30:10 ,   loglike= -2043.078  / max. param. ch. :  0.003284  / relative deviance change :  1.4e-05
Iter.  16  :  04:30:10 ,   loglike= -2043.052  / max. param. ch. :  0.003261  / relative deviance change :  1.3e-05
Iter.  17  :  04:30:10 ,   loglike= -2043.029  / max. param. ch. :  0.003243  / relative deviance change :  1.1e-05
Iter.  18  :  04:30:10 ,   loglike= -2043.007  / max. param. ch. :  0.003228  / relative deviance change :  1.1e-05
Iter.  19  :  04:30:10 ,   loglike= -2042.987  / max. param. ch. :  0.003213  / relative deviance change :  1e-05
Iter.  20  :  04:30:10 ,   loglike= -2042.969  / max. param. ch. :  0.003199  / relative deviance change :  9e-06
Iter.  21  :  04:30:10 ,   loglike= -2042.951  / max. param. ch. :  0.003186  / relative deviance change :  9e-06
Iter.  22  :  04:30:10 ,   loglike= -2042.935  / max. param. ch. :  0.003171  / relative deviance change :  8e-06
Iter.  23  :  04:30:10 ,   loglike= -2042.919  / max. param. ch. :  0.003156  / relative deviance change :  8e-06
Iter.  24  :  04:30:10 ,   loglike= -2042.904  / max. param. ch. :  0.003141  / relative deviance change :  7e-06
Iter.  25  :  04:30:10 ,   loglike= -2042.89  / max. param. ch. :  0.003125  / relative deviance change :  7e-06
Iter.  26  :  04:30:10 ,   loglike= -2042.876  / max. param. ch. :  0.003108  / relative deviance change :  7e-06
Iter.  27  :  04:30:10 ,   loglike= -2042.863  / max. param. ch. :  0.00309  / relative deviance change :  6e-06
Iter.  28  :  04:30:10 ,   loglike= -2042.85  / max. param. ch. :  0.003072  / relative deviance change :  6e-06
Iter.  29  :  04:30:10 ,   loglike= -2042.838  / max. param. ch. :  0.003053  / relative deviance change :  6e-06
Iter.  30  :  04:30:10 ,   loglike= -2042.826  / max. param. ch. :  0.003033  / relative deviance change :  6e-06
Iter.  31  :  04:30:10 ,   loglike= -2042.815  / max. param. ch. :  0.003013  / relative deviance change :  6e-06
Iter.  32  :  04:30:10 ,   loglike= -2042.804  / max. param. ch. :  0.002992  / relative deviance change :  5e-06
Iter.  33  :  04:30:10 ,   loglike= -2042.793  / max. param. ch. :  0.002971  / relative deviance change :  5e-06
Iter.  34  :  04:30:10 ,   loglike= -2042.782  / max. param. ch. :  0.002949  / relative deviance change :  5e-06
Iter.  35  :  04:30:10 ,   loglike= -2042.772  / max. param. ch. :  0.002927  / relative deviance change :  5e-06
Iter.  36  :  04:30:10 ,   loglike= -2042.762  / max. param. ch. :  0.002904  / relative deviance change :  5e-06
Iter.  37  :  04:30:10 ,   loglike= -2042.752  / max. param. ch. :  0.002881  / relative deviance change :  5e-06
Iter.  38  :  04:30:10 ,   loglike= -2042.743  / max. param. ch. :  0.002858  / relative deviance change :  5e-06
Iter.  39  :  04:30:10 ,   loglike= -2042.734  / max. param. ch. :  0.002834  / relative deviance change :  5e-06
Iter.  40  :  04:30:10 ,   loglike= -2042.725  / max. param. ch. :  0.00281  / relative deviance change :  4e-06
Iter.  41  :  04:30:10 ,   loglike= -2042.716  / max. param. ch. :  0.002785  / relative deviance change :  4e-06
Iter.  42  :  04:30:10 ,   loglike= -2042.707  / max. param. ch. :  0.002761  / relative deviance change :  4e-06
Iter.  43  :  04:30:10 ,   loglike= -2042.699  / max. param. ch. :  0.002736  / relative deviance change :  4e-06
Iter.  44  :  04:30:10 ,   loglike= -2042.69  / max. param. ch. :  0.00271  / relative deviance change :  4e-06
Iter.  45  :  04:30:10 ,   loglike= -2042.682  / max. param. ch. :  0.002685  / relative deviance change :  4e-06
Iter.  46  :  04:30:10 ,   loglike= -2042.674  / max. param. ch. :  0.002659  / relative deviance change :  4e-06
Iter.  47  :  04:30:10 ,   loglike= -2042.666  / max. param. ch. :  0.002633  / relative deviance change :  4e-06
Iter.  48  :  04:30:10 ,   loglike= -2042.659  / max. param. ch. :  0.002607  / relative deviance change :  4e-06
Iter.  49  :  04:30:10 ,   loglike= -2042.651  / max. param. ch. :  0.002581  / relative deviance change :  4e-06
Iter.  50  :  04:30:10 ,   loglike= -2042.644  / max. param. ch. :  0.002555  / relative deviance change :  4e-06
Iter.  51  :  04:30:10 ,   loglike= -2042.637  / max. param. ch. :  0.002528  / relative deviance change :  3e-06
Iter.  52  :  04:30:10 ,   loglike= -2042.63  / max. param. ch. :  0.002501  / relative deviance change :  3e-06
Iter.  53  :  04:30:10 ,   loglike= -2042.623  / max. param. ch. :  0.002475  / relative deviance change :  3e-06
Iter.  54  :  04:30:10 ,   loglike= -2042.616  / max. param. ch. :  0.002448  / relative deviance change :  3e-06
Iter.  55  :  04:30:10 ,   loglike= -2042.61  / max. param. ch. :  0.002421  / relative deviance change :  3e-06
Iter.  56  :  04:30:10 ,   loglike= -2042.603  / max. param. ch. :  0.002394  / relative deviance change :  3e-06
Iter.  57  :  04:30:10 ,   loglike= -2042.597  / max. param. ch. :  0.002367  / relative deviance change :  3e-06
Iter.  58  :  04:30:10 ,   loglike= -2042.591  / max. param. ch. :  0.002341  / relative deviance change :  3e-06
Iter.  59  :  04:30:10 ,   loglike= -2042.585  / max. param. ch. :  0.002314  / relative deviance change :  3e-06
Iter.  60  :  04:30:10 ,   loglike= -2042.579  / max. param. ch. :  0.002287  / relative deviance change :  3e-06
Iter.  61  :  04:30:10 ,   loglike= -2042.573  / max. param. ch. :  0.00226  / relative deviance change :  3e-06
Iter.  62  :  04:30:10 ,   loglike= -2042.567  / max. param. ch. :  0.002233  / relative deviance change :  3e-06
Iter.  63  :  04:30:10 ,   loglike= -2042.562  / max. param. ch. :  0.002206  / relative deviance change :  3e-06
Iter.  64  :  04:30:10 ,   loglike= -2042.556  / max. param. ch. :  0.00218  / relative deviance change :  3e-06
Iter.  65  :  04:30:10 ,   loglike= -2042.551  / max. param. ch. :  0.002153  / relative deviance change :  3e-06
Iter.  66  :  04:30:10 ,   loglike= -2042.546  / max. param. ch. :  0.002127  / relative deviance change :  3e-06
Iter.  67  :  04:30:10 ,   loglike= -2042.541  / max. param. ch. :  0.0021  / relative deviance change :  3e-06
Iter.  68  :  04:30:10 ,   loglike= -2042.536  / max. param. ch. :  0.002074  / relative deviance change :  2e-06
Iter.  69  :  04:30:10 ,   loglike= -2042.531  / max. param. ch. :  0.002047  / relative deviance change :  2e-06
Iter.  70  :  04:30:10 ,   loglike= -2042.526  / max. param. ch. :  0.002021  / relative deviance change :  2e-06
Iter.  71  :  04:30:10 ,   loglike= -2042.521  / max. param. ch. :  0.001995  / relative deviance change :  2e-06
Iter.  72  :  04:30:10 ,   loglike= -2042.516  / max. param. ch. :  0.00197  / relative deviance change :  2e-06
Iter.  73  :  04:30:10 ,   loglike= -2042.512  / max. param. ch. :  0.001944  / relative deviance change :  2e-06
Iter.  74  :  04:30:10 ,   loglike= -2042.507  / max. param. ch. :  0.001918  / relative deviance change :  2e-06
Iter.  75  :  04:30:10 ,   loglike= -2042.503  / max. param. ch. :  0.001893  / relative deviance change :  2e-06
Iter.  76  :  04:30:10 ,   loglike= -2042.499  / max. param. ch. :  0.001868  / relative deviance change :  2e-06
Iter.  77  :  04:30:10 ,   loglike= -2042.495  / max. param. ch. :  0.001843  / relative deviance change :  2e-06
Iter.  78  :  04:30:10 ,   loglike= -2042.49  / max. param. ch. :  0.001818  / relative deviance change :  2e-06
Iter.  79  :  04:30:10 ,   loglike= -2042.486  / max. param. ch. :  0.001793  / relative deviance change :  2e-06
Iter.  80  :  04:30:10 ,   loglike= -2042.482  / max. param. ch. :  0.001768  / relative deviance change :  2e-06
Iter.  81  :  04:30:10 ,   loglike= -2042.479  / max. param. ch. :  0.001744  / relative deviance change :  2e-06
Iter.  82  :  04:30:10 ,   loglike= -2042.475  / max. param. ch. :  0.00172  / relative deviance change :  2e-06
Iter.  83  :  04:30:10 ,   loglike= -2042.471  / max. param. ch. :  0.001696  / relative deviance change :  2e-06
Iter.  84  :  04:30:10 ,   loglike= -2042.468  / max. param. ch. :  0.001672  / relative deviance change :  2e-06
Iter.  85  :  04:30:10 ,   loglike= -2042.464  / max. param. ch. :  0.001649  / relative deviance change :  2e-06
Iter.  86  :  04:30:10 ,   loglike= -2042.461  / max. param. ch. :  0.001626  / relative deviance change :  2e-06
Iter.  87  :  04:30:10 ,   loglike= -2042.457  / max. param. ch. :  0.001602  / relative deviance change :  2e-06
Iter.  88  :  04:30:10 ,   loglike= -2042.454  / max. param. ch. :  0.00158  / relative deviance change :  2e-06
Iter.  89  :  04:30:10 ,   loglike= -2042.45  / max. param. ch. :  0.001557  / relative deviance change :  2e-06
Iter.  90  :  04:30:10 ,   loglike= -2042.447  / max. param. ch. :  0.001535  / relative deviance change :  2e-06
Iter.  91  :  04:30:10 ,   loglike= -2042.444  / max. param. ch. :  0.001512  / relative deviance change :  2e-06
Iter.  92  :  04:30:10 ,   loglike= -2042.441  / max. param. ch. :  0.00149  / relative deviance change :  2e-06
Iter.  93  :  04:30:10 ,   loglike= -2042.438  / max. param. ch. :  0.001469  / relative deviance change :  1e-06
Iter.  94  :  04:30:10 ,   loglike= -2042.435  / max. param. ch. :  0.001447  / relative deviance change :  1e-06
Iter.  95  :  04:30:10 ,   loglike= -2042.432  / max. param. ch. :  0.001426  / relative deviance change :  1e-06
Iter.  96  :  04:30:10 ,   loglike= -2042.429  / max. param. ch. :  0.001405  / relative deviance change :  1e-06
Iter.  97  :  04:30:10 ,   loglike= -2042.427  / max. param. ch. :  0.001384  / relative deviance change :  1e-06
Iter.  98  :  04:30:10 ,   loglike= -2042.424  / max. param. ch. :  0.001363  / relative deviance change :  1e-06
Iter.  99  :  04:30:10 ,   loglike= -2042.421  / max. param. ch. :  0.001343  / relative deviance change :  1e-06
Iter.  100  :  04:30:10 ,   loglike= -2042.419  / max. param. ch. :  0.001323  / relative deviance change :  1e-06
Iter.  101  :  04:30:10 ,   loglike= -2042.416  / max. param. ch. :  0.001303  / relative deviance change :  1e-06
Iter.  102  :  04:30:10 ,   loglike= -2042.414  / max. param. ch. :  0.001284  / relative deviance change :  1e-06
Iter.  103  :  04:30:10 ,   loglike= -2042.411  / max. param. ch. :  0.001264  / relative deviance change :  1e-06
Iter.  104  :  04:30:10 ,   loglike= -2042.409  / max. param. ch. :  0.001245  / relative deviance change :  1e-06
Iter.  105  :  04:30:10 ,   loglike= -2042.406  / max. param. ch. :  0.001226  / relative deviance change :  1e-06
Iter.  106  :  04:30:10 ,   loglike= -2042.404  / max. param. ch. :  0.001207  / relative deviance change :  1e-06
Iter.  107  :  04:30:10 ,   loglike= -2042.402  / max. param. ch. :  0.001189  / relative deviance change :  1e-06
Iter.  108  :  04:30:10 ,   loglike= -2042.4  / max. param. ch. :  0.001171  / relative deviance change :  1e-06
Iter.  109  :  04:30:10 ,   loglike= -2042.397  / max. param. ch. :  0.001153  / relative deviance change :  1e-06
Iter.  110  :  04:30:10 ,   loglike= -2042.395  / max. param. ch. :  0.001135  / relative deviance change :  1e-06
Iter.  111  :  04:30:10 ,   loglike= -2042.393  / max. param. ch. :  0.001117  / relative deviance change :  1e-06
Iter.  112  :  04:30:10 ,   loglike= -2042.391  / max. param. ch. :  0.0011  / relative deviance change :  1e-06
Iter.  113  :  04:30:10 ,   loglike= -2042.389  / max. param. ch. :  0.001083  / relative deviance change :  1e-06
Iter.  114  :  04:30:10 ,   loglike= -2042.387  / max. param. ch. :  0.001066  / relative deviance change :  1e-06
Iter.  115  :  04:30:10 ,   loglike= -2042.385  / max. param. ch. :  0.00105  / relative deviance change :  1e-06
Iter.  116  :  04:30:10 ,   loglike= -2042.383  / max. param. ch. :  0.001033  / relative deviance change :  1e-06
Iter.  117  :  04:30:10 ,   loglike= -2042.382  / max. param. ch. :  0.001017  / relative deviance change :  1e-06
Iter.  118  :  04:30:10 ,   loglike= -2042.38  / max. param. ch. :  0.001001  / relative deviance change :  1e-06
Iter.  119  :  04:30:10 ,   loglike= -2042.378  / max. param. ch. :  0.000985  / relative deviance change :  1e-06
---------------------------------------------------------------------------------
Time difference of 0.1845834 secs
CDM 7.0-12 (Built 2018-11-06 16:23:12)
Call:
 CDM::din(data = sim.dina, q.matrix = sim.qmatrix) 

Date of Analysis: 2018-11-21 04:30:10 
Time difference of 0.1845834 secs
Computation Time: 0.1845834 


Deviance = 4084.756  |   Log-Likelihood= -2042.378 

Number of iterations: 120 

Number of item parameters: 18 
Number of skill class parameters: 7 

Information criteria: 
  AIC = 4134.756 
  BIC = 4234.543 

Mean of RMSEA item fit: 0.039 

Item parameters
   item guess  slip   IDI rmsea
1 Item1 0.086 0.210 0.704 0.014
2 Item2 0.109 0.239 0.652 0.034
3 Item3 0.129 0.185 0.686 0.028
4 Item4 0.226 0.218 0.556 0.019
5 Item5 0.059 0.000 0.941 0.002
6 Item6 0.248 0.500 0.252 0.036
7 Item7 0.243 0.489 0.268 0.041
8 Item8 0.278 0.125 0.597 0.109
9 Item9 0.317 0.027 0.656 0.065

Marginal skill probabilities:
   skill.prob
V1     0.3660
V2     0.5849
V3     0.7875

Tetrachoric correlations among skill dimensions
       V1     V2     V3
V1 1.0000 0.4133 0.3989
V2 0.4133 1.0000 0.2406
V3 0.3989 0.2406 1.0000

Skill Pattern Probabilities 

    000     100     010     001     110     101     011     111 
0.10460 0.01152 0.07144 0.21971 0.02496 0.07930 0.23820 0.25026 
          fsc1b[, 1]
fsc1a[, 1]   0   1
         0 229   0
         1  40 131

CDM documentation built on March 26, 2020, 5:50 p.m.