This function computes the goodness of the IRT model for a given algorithm for different goodness tolerances.

model_goodness_for_algo_crm(mod, num = 1)

Arguments

mod

A fitted mirt model using the function irtmodel or R package mirt.

num

The algorithm number, for which the goodness of the IRT model is computed.

Value

A list with the following components:

xy

The x values denote the goodness tolerances. The y values denote the model goodness.

auc

The area under the model goodness curve.

residuals

The different between actual and fitted performance values.

Examples

# \donttest{
set.seed(1)
x1 <- runif(100)
x2 <- runif(100)
x3 <- runif(100)
X <- cbind.data.frame(x1, x2, x3)
max_item <- rep(1,3)
min_item <- rep(0,3)
mod <- cirtmodel(X, max.item=max_item, min.item=min_item)
#> Warning: NaNs produced
#> Warning: NaNs produced
out <- model_goodness_for_algo_crm(mod$model, num=1)
out
#> $xy
#>                 x    y
#>   [1,] 0.00000000 0.00
#>   [2,] 0.01010101 0.07
#>   [3,] 0.02020202 0.12
#>   [4,] 0.03030303 0.19
#>   [5,] 0.04040404 0.26
#>   [6,] 0.05050505 0.32
#>   [7,] 0.06060606 0.39
#>   [8,] 0.07070707 0.44
#>   [9,] 0.08080808 0.53
#>  [10,] 0.09090909 0.59
#>  [11,] 0.10101010 0.65
#>  [12,] 0.11111111 0.72
#>  [13,] 0.12121212 0.75
#>  [14,] 0.13131313 0.81
#>  [15,] 0.14141414 0.83
#>  [16,] 0.15151515 0.88
#>  [17,] 0.16161616 0.92
#>  [18,] 0.17171717 0.93
#>  [19,] 0.18181818 0.94
#>  [20,] 0.19191919 0.95
#>  [21,] 0.20202020 0.96
#>  [22,] 0.21212121 0.97
#>  [23,] 0.22222222 0.97
#>  [24,] 0.23232323 0.98
#>  [25,] 0.24242424 0.99
#>  [26,] 0.25252525 0.99
#>  [27,] 0.26262626 0.99
#>  [28,] 0.27272727 0.99
#>  [29,] 0.28282828 0.99
#>  [30,] 0.29292929 0.99
#>  [31,] 0.30303030 0.99
#>  [32,] 0.31313131 0.99
#>  [33,] 0.32323232 0.99
#>  [34,] 0.33333333 1.00
#>  [35,] 0.34343434 1.00
#>  [36,] 0.35353535 1.00
#>  [37,] 0.36363636 1.00
#>  [38,] 0.37373737 1.00
#>  [39,] 0.38383838 1.00
#>  [40,] 0.39393939 1.00
#>  [41,] 0.40404040 1.00
#>  [42,] 0.41414141 1.00
#>  [43,] 0.42424242 1.00
#>  [44,] 0.43434343 1.00
#>  [45,] 0.44444444 1.00
#>  [46,] 0.45454545 1.00
#>  [47,] 0.46464646 1.00
#>  [48,] 0.47474747 1.00
#>  [49,] 0.48484848 1.00
#>  [50,] 0.49494949 1.00
#>  [51,] 0.50505051 1.00
#>  [52,] 0.51515152 1.00
#>  [53,] 0.52525253 1.00
#>  [54,] 0.53535354 1.00
#>  [55,] 0.54545455 1.00
#>  [56,] 0.55555556 1.00
#>  [57,] 0.56565657 1.00
#>  [58,] 0.57575758 1.00
#>  [59,] 0.58585859 1.00
#>  [60,] 0.59595960 1.00
#>  [61,] 0.60606061 1.00
#>  [62,] 0.61616162 1.00
#>  [63,] 0.62626263 1.00
#>  [64,] 0.63636364 1.00
#>  [65,] 0.64646465 1.00
#>  [66,] 0.65656566 1.00
#>  [67,] 0.66666667 1.00
#>  [68,] 0.67676768 1.00
#>  [69,] 0.68686869 1.00
#>  [70,] 0.69696970 1.00
#>  [71,] 0.70707071 1.00
#>  [72,] 0.71717172 1.00
#>  [73,] 0.72727273 1.00
#>  [74,] 0.73737374 1.00
#>  [75,] 0.74747475 1.00
#>  [76,] 0.75757576 1.00
#>  [77,] 0.76767677 1.00
#>  [78,] 0.77777778 1.00
#>  [79,] 0.78787879 1.00
#>  [80,] 0.79797980 1.00
#>  [81,] 0.80808081 1.00
#>  [82,] 0.81818182 1.00
#>  [83,] 0.82828283 1.00
#>  [84,] 0.83838384 1.00
#>  [85,] 0.84848485 1.00
#>  [86,] 0.85858586 1.00
#>  [87,] 0.86868687 1.00
#>  [88,] 0.87878788 1.00
#>  [89,] 0.88888889 1.00
#>  [90,] 0.89898990 1.00
#>  [91,] 0.90909091 1.00
#>  [92,] 0.91919192 1.00
#>  [93,] 0.92929293 1.00
#>  [94,] 0.93939394 1.00
#>  [95,] 0.94949495 1.00
#>  [96,] 0.95959596 1.00
#>  [97,] 0.96969697 1.00
#>  [98,] 0.97979798 1.00
#>  [99,] 0.98989899 1.00
#> [100,] 1.00000000 1.00
#> 
#> $auc
#> [1] 0.9149495
#> 
#> $mse
#> [1] 0.01047572
#> 
#> $residuals
#>   [1] 0.071771468 0.003904213 0.025016641 0.057620394 0.068149066 0.110732542
#>   [7] 0.097346398 0.129274893 0.035322356 0.123338279 0.328157193 0.053973328
#>  [13] 0.018344523 0.191103799 0.052388142 0.091068971 0.027952320 0.008911894
#>  [19] 0.201063843 0.098311628 0.062195608 0.053838881 0.072988670 0.100431697
#>  [25] 0.228517777 0.060962947 0.043441197 0.101899985 0.123876369 0.160650777
#>  [31] 0.003489988 0.149347488 0.063464293 0.146024302 0.074389731 0.010306713
#>  [37] 0.056647880 0.124015726 0.009078004 0.045371473 0.109915326 0.020449610
#>  [43] 0.020326326 0.100610736 0.008597901 0.138009935 0.034553556 0.037845020
#>  [49] 0.110113474 0.074545502 0.084195694 0.022525963 0.025370264 0.120116766
#>  [55] 0.101032182 0.043303369 0.043049428 0.034442161 0.082179558 0.151442358
#>  [61] 0.103463609 0.097445847 0.010202242 0.157970260 0.023544371 0.035195430
#>  [67] 0.145073421 0.049625155 0.133519654 0.159325336 0.034260562 0.148929483
#>  [73] 0.086230105 0.007821019 0.017345470 0.115610809 0.124284928 0.013763767
#>  [79] 0.079611527 0.045522421 0.141711477 0.081623651 0.178401841 0.062465060
#>  [85] 0.188813252 0.030231762 0.073823853 0.078154439 0.075412873 0.081869187
#>  [91] 0.074314902 0.052359379 0.155514449 0.089872309 0.095491965 0.057148457
#>  [97] 0.098021353 0.007229195 0.236437695 0.100686190
#> 
# }