Running examples in ‘CDM-Ex.R’ failed
The error most likely occurred in:

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

Date of Analysis: 2021-12-02 20:41:45 
Time difference of 0.192755 secs
Computation Time: 0.192755 


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.651 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 
> # compute entropy for test and items
> emod1 <- CDM::entropy.lca( mod1 )
> summary(emod1)
Error in Math.data.frame(list(item = c("test", "Item1", "Item2", "Item3",  : 
  non-numeric-alike variable(s) in data frame: item
Calls: summary ... summary.entropy.lca -> cdm_print_summary_data_frame -> Math.data.frame
Execution halted