Running examples in 'TAM-Ex.R' failed
The error most likely occurred in:

> ### Name: IRT.residuals
> ### Title: Residuals in an IRT Model
> ### Aliases: IRT.residuals IRT.residuals.tam.jml IRT.residuals.tam.mml
> ###   IRT.residuals.tam.mml.2pl IRT.residuals.tam.mml.mfr residuals.tam.jml
> ###   residuals.tam.mml residuals.tam.mml.2pl residuals.tam.mml.mfr
> ### Keywords: Residuals
> 
> ### ** Examples
> 
> #############################################################################
> # EXAMPLE 1: Residuals data.read
> #############################################################################
> 
> library(sirt)
- sirt 2.7-50 (2018-07-09 20:56:06)
> data(data.read,package="sirt")
> dat <- data.read
> 
> # for Rasch model
> mod <- TAM::tam.mml( dat )
....................................................
Processing Data      2018-10-22 21:39:25 
    * Response Data: 328 Persons and  12 Items 
    * Numerical integration with 21 nodes
    * Created Design Matrices   ( 2018-10-22 21:39:25 )
    * Calculated Sufficient Statistics   ( 2018-10-22 21:39:25 )
....................................................
Iteration 1     2018-10-22 21:39:25
E Step
M Step Intercepts   |----
  Deviance = 3955.0021
  Maximum item intercept parameter change: 0.282708
  Maximum item slope parameter change: 0
  Maximum regression parameter change: 0
  Maximum variance parameter change: 0.001983
....................................................
Iteration 2     2018-10-22 21:39:25
E Step
M Step Intercepts   |---
  Deviance = 3942.7485 | Absolute change: 12.2536 | Relative change: 0.00310788
  Maximum item intercept parameter change: 0.048264
  Maximum item slope parameter change: 0
  Maximum regression parameter change: 0
  Maximum variance parameter change: 0.038661
....................................................
Iteration 3     2018-10-22 21:39:25
E Step
M Step Intercepts   |---
  Deviance = 3940.8177 | Absolute change: 1.9308 | Relative change: 0.00048995
  Maximum item intercept parameter change: 0.032447
  Maximum item slope parameter change: 0
  Maximum regression parameter change: 0
  Maximum variance parameter change: 0.033165
....................................................
Iteration 4     2018-10-22 21:39:25
E Step
M Step Intercepts   |---
  Deviance = 3939.8371 | Absolute change: 0.9806 | Relative change: 0.00024889
  Maximum item intercept parameter change: 0.023311
  Maximum item slope parameter change: 0
  Maximum regression parameter change: 0
  Maximum variance parameter change: 0.027088
....................................................
Iteration 5     2018-10-22 21:39:25
E Step
M Step Intercepts   |---
  Deviance = 3939.3212 | Absolute change: 0.516 | Relative change: 0.00013098
  Maximum item intercept parameter change: 0.016965
  Maximum item slope parameter change: 0
  Maximum regression parameter change: 0
  Maximum variance parameter change: 0.021496
....................................................
Iteration 6     2018-10-22 21:39:25
E Step
M Step Intercepts   |--
  Deviance = 3939.0438 | Absolute change: 0.2774 | Relative change: 7.041e-05
  Maximum item intercept parameter change: 0.012453
  Maximum item slope parameter change: 0
  Maximum regression parameter change: 0
  Maximum variance parameter change: 0.016715
....................................................
Iteration 7     2018-10-22 21:39:25
E Step
M Step Intercepts   |--
  Deviance = 3938.8929 | Absolute change: 0.151 | Relative change: 3.832e-05
  Maximum item intercept parameter change: 0.009194
  Maximum item slope parameter change: 0
  Maximum regression parameter change: 0
  Maximum variance parameter change: 0.012811
....................................................
Iteration 8     2018-10-22 21:39:25
E Step
M Step Intercepts   |--
  Deviance = 3938.8101 | Absolute change: 0.0828 | Relative change: 2.101e-05
  Maximum item intercept parameter change: 0.006814
  Maximum item slope parameter change: 0
  Maximum regression parameter change: 0
  Maximum variance parameter change: 0.009721
....................................................
Iteration 9     2018-10-22 21:39:25
E Step
M Step Intercepts   |--
  Deviance = 3938.7645 | Absolute change: 0.0456 | Relative change: 1.157e-05
  Maximum item intercept parameter change: 0.005064
  Maximum item slope parameter change: 0
  Maximum regression parameter change: 0
  Maximum variance parameter change: 0.007324
....................................................
Iteration 10     2018-10-22 21:39:25
E Step
M Step Intercepts   |--
  Deviance = 3938.7393 | Absolute change: 0.0252 | Relative change: 6.39e-06
  Maximum item intercept parameter change: 0.00377
  Maximum item slope parameter change: 0
  Maximum regression parameter change: 0
  Maximum variance parameter change: 0.005493
....................................................
Iteration 11     2018-10-22 21:39:25
E Step
M Step Intercepts   |--
  Deviance = 3938.7254 | Absolute change: 0.0139 | Relative change: 3.54e-06
  Maximum item intercept parameter change: 0.00281
  Maximum item slope parameter change: 0
  Maximum regression parameter change: 0
  Maximum variance parameter change: 0.004106
....................................................
Iteration 12     2018-10-22 21:39:25
E Step
M Step Intercepts   |--
  Deviance = 3938.7177 | Absolute change: 0.0077 | Relative change: 1.96e-06
  Maximum item intercept parameter change: 0.002096
  Maximum item slope parameter change: 0
  Maximum regression parameter change: 0
  Maximum variance parameter change: 0.003063
....................................................
Iteration 13     2018-10-22 21:39:25
E Step
M Step Intercepts   |--
  Deviance = 3938.7134 | Absolute change: 0.0043 | Relative change: 1.09e-06
  Maximum item intercept parameter change: 0.001564
  Maximum item slope parameter change: 0
  Maximum regression parameter change: 0
  Maximum variance parameter change: 0.002283
....................................................
Iteration 14     2018-10-22 21:39:25
E Step
M Step Intercepts   |--
  Deviance = 3938.711 | Absolute change: 0.0024 | Relative change: 6e-07
  Maximum item intercept parameter change: 0.001168
  Maximum item slope parameter change: 0
  Maximum regression parameter change: 0
  Maximum variance parameter change: 0.0017
....................................................
Iteration 15     2018-10-22 21:39:25
E Step
M Step Intercepts   |--
  Deviance = 3938.7097 | Absolute change: 0.0013 | Relative change: 3.4e-07
  Maximum item intercept parameter change: 0.000872
  Maximum item slope parameter change: 0
  Maximum regression parameter change: 0
  Maximum variance parameter change: 0.001265
....................................................
Iteration 16     2018-10-22 21:39:25
E Step
M Step Intercepts   |--
  Deviance = 3938.709 | Absolute change: 7e-04 | Relative change: 1.9e-07
  Maximum item intercept parameter change: 0.000651
  Maximum item slope parameter change: 0
  Maximum regression parameter change: 0
  Maximum variance parameter change: 0.000942
....................................................
Iteration 17     2018-10-22 21:39:25
E Step
M Step Intercepts   |--
  Deviance = 3938.7085 | Absolute change: 4e-04 | Relative change: 1e-07
  Maximum item intercept parameter change: 0.000486
  Maximum item slope parameter change: 0
  Maximum regression parameter change: 0
  Maximum variance parameter change: 0.000701
....................................................
Iteration 18     2018-10-22 21:39:25
E Step
M Step Intercepts   |--
  Deviance = 3938.7083 | Absolute change: 2e-04 | Relative change: 6e-08
  Maximum item intercept parameter change: 0.000363
  Maximum item slope parameter change: 0
  Maximum regression parameter change: 0
  Maximum variance parameter change: 0.000522
....................................................
Iteration 19     2018-10-22 21:39:26
E Step
M Step Intercepts   |--
  Deviance = 3938.7082 | Absolute change: 1e-04 | Relative change: 3e-08
  Maximum item intercept parameter change: 0.000271
  Maximum item slope parameter change: 0
  Maximum regression parameter change: 0
  Maximum variance parameter change: 0.000389
....................................................
Iteration 20     2018-10-22 21:39:26
E Step
M Step Intercepts   |--
  Deviance = 3938.7081 | Absolute change: 1e-04 | Relative change: 2e-08
  Maximum item intercept parameter change: 0.000202
  Maximum item slope parameter change: 0
  Maximum regression parameter change: 0
  Maximum variance parameter change: 0.000289
....................................................
Iteration 21     2018-10-22 21:39:26
E Step
M Step Intercepts   |--
  Deviance = 3938.7081 | Absolute change: 0 | Relative change: 1e-08
  Maximum item intercept parameter change: 0.000151
  Maximum item slope parameter change: 0
  Maximum regression parameter change: 0
  Maximum variance parameter change: 0.000216
....................................................
Iteration 22     2018-10-22 21:39:26
E Step
M Step Intercepts   |--
  Deviance = 3938.7081 | Absolute change: 0 | Relative change: 1e-08
  Maximum item intercept parameter change: 0.000113
  Maximum item slope parameter change: 0
  Maximum regression parameter change: 0
  Maximum variance parameter change: 0.000161
....................................................
Iteration 23     2018-10-22 21:39:26
E Step
M Step Intercepts   |-
  Deviance = 3938.708 | Absolute change: 0 | Relative change: 0
  Maximum item intercept parameter change: 8.4e-05
  Maximum item slope parameter change: 0
  Maximum regression parameter change: 0
  Maximum variance parameter change: 0.00012
....................................................
Iteration 24     2018-10-22 21:39:26
E Step
M Step Intercepts   |-
  Deviance = 3938.708 | Absolute change: 0 | Relative change: 0
  Maximum item intercept parameter change: 6.3e-05
  Maximum item slope parameter change: 0
  Maximum regression parameter change: 0
  Maximum variance parameter change: 8.9e-05
....................................................
Item Parameters
   xsi.index xsi.label     est
1          1        A1 -2.1045
2          2        A2 -1.2742
3          3        A3 -0.3379
4          4        A4  0.1953
5          5        B1 -1.1262
6          6        B2 -0.0327
7          7        B3 -2.7346
8          8        B4 -0.9502
9          9        C1 -3.1058
10        10        C2 -1.1262
11        11        C3 -2.3095
12        12        C4 -1.2553
...................................
Regression Coefficients
     [,1]
[1,]    0

Variance:
     [,1]
[1,] 1.19


EAP Reliability:
[1] 0.662

-----------------------------
Start:  2018-10-22 21:39:25
End:  2018-10-22 21:39:26 
Time difference of 0.0624001 secs

> # extract residuals
> res <- TAM::IRT.residuals( mod )
Error in `[<-.data.frame`(`*tmp*`, check1[, ii], ind2[ii], value = NA) : 
  replacement has 1 row, data has 0
Calls: <Anonymous> ... tam.mml.wle2 -> tam_mml_wle_postproc -> [<- -> [<-.data.frame
Execution halted