Skip to contents

Data from Thissen (1982); contains 5 dichotomously scored items obtained from the Law School Admissions Test, section 6.

References

Thissen, D. (1982). Marginal maximum likelihood estimation for the one-parameter logistic model. Psychometrika, 47, 175-186.

Author

Phil Chalmers rphilip.chalmers@gmail.com

Examples


# \donttest{
dat <- expand.table(LSAT6)
head(dat)
#>   Item_1 Item_2 Item_3 Item_4 Item_5
#> 1      0      0      0      0      0
#> 2      0      0      0      0      0
#> 3      0      0      0      0      0
#> 4      0      0      0      0      1
#> 5      0      0      0      0      1
#> 6      0      0      0      0      1
itemstats(dat)
#> $overall
#>     N mean_total.score sd_total.score ave.r sd.r alpha SEM.alpha
#>  1000            3.819          1.035 0.077 0.03 0.295     0.869
#> 
#> $itemstats
#>           N  mean    sd total.r total.r_if_rm alpha_if_rm
#> Item_1 1000 0.924 0.265   0.362         0.113       0.275
#> Item_2 1000 0.709 0.454   0.567         0.153       0.238
#> Item_3 1000 0.553 0.497   0.618         0.173       0.217
#> Item_4 1000 0.763 0.425   0.534         0.144       0.246
#> Item_5 1000 0.870 0.336   0.435         0.122       0.266
#> 
#> $proportions
#>            0     1
#> Item_1 0.076 0.924
#> Item_2 0.291 0.709
#> Item_3 0.447 0.553
#> Item_4 0.237 0.763
#> Item_5 0.130 0.870
#> 

model <- 'F = 1-5
         CONSTRAIN = (1-5, a1)'
(mod <- mirt(dat, model))
#> 
Iteration: 1, Log-Lik: -2468.601, Max-Change: 0.07077
Iteration: 2, Log-Lik: -2467.371, Max-Change: 0.02297
Iteration: 3, Log-Lik: -2467.099, Max-Change: 0.01355
Iteration: 4, Log-Lik: -2466.986, Max-Change: 0.00735
Iteration: 5, Log-Lik: -2466.959, Max-Change: 0.00482
Iteration: 6, Log-Lik: -2466.947, Max-Change: 0.00316
Iteration: 7, Log-Lik: -2466.939, Max-Change: 0.00109
Iteration: 8, Log-Lik: -2466.938, Max-Change: 0.00073
Iteration: 9, Log-Lik: -2466.938, Max-Change: 0.00049
Iteration: 10, Log-Lik: -2466.938, Max-Change: 0.00028
Iteration: 11, Log-Lik: -2466.938, Max-Change: 0.00016
Iteration: 12, Log-Lik: -2466.938, Max-Change: 0.00009
#> 
#> Call:
#> mirt(data = dat, model = model)
#> 
#> Full-information item factor analysis with 1 factor(s).
#> Converged within 1e-04 tolerance after 12 EM iterations.
#> mirt version: 1.44.3 
#> M-step optimizer: BFGS 
#> EM acceleration: Ramsay 
#> Number of rectangular quadrature: 61
#> Latent density type: Gaussian 
#> 
#> Log-likelihood = -2466.938
#> Estimated parameters: 6 
#> AIC = 4945.875
#> BIC = 4975.322; SABIC = 4956.265
#> G2 (25) = 21.8, p = 0.6474
#> RMSEA = 0, CFI = NaN, TLI = NaN
M2(mod)
#>             M2 df         p RMSEA RMSEA_5   RMSEA_95      SRMSR      TLI CFI
#> stats 5.292566  9 0.8080952     0       0 0.02254275 0.02242068 1.072511   1
itemfit(mod)
#>     item  S_X2 df.S_X2 RMSEA.S_X2 p.S_X2
#> 1 Item_1 0.436       2          0  0.804
#> 2 Item_2 1.576       2          0  0.455
#> 3 Item_3 0.871       1          0  0.351
#> 4 Item_4 0.190       2          0  0.909
#> 5 Item_5 0.190       2          0  0.909
coef(mod, simplify=TRUE)
#> $items
#>           a1     d g u
#> Item_1 0.755 2.730 0 1
#> Item_2 0.755 0.999 0 1
#> Item_3 0.755 0.240 0 1
#> Item_4 0.755 1.307 0 1
#> Item_5 0.755 2.100 0 1
#> 
#> $means
#> F 
#> 0 
#> 
#> $cov
#>   F
#> F 1
#> 

# equivalentely, but with a different parameterization
mod2 <- mirt(dat, 1, itemtype = 'Rasch')
#> 
Iteration: 1, Log-Lik: -2473.219, Max-Change: 0.05796
Iteration: 2, Log-Lik: -2471.905, Max-Change: 0.03951
Iteration: 3, Log-Lik: -2471.040, Max-Change: 0.03366
Iteration: 4, Log-Lik: -2470.482, Max-Change: 0.03644
Iteration: 5, Log-Lik: -2469.693, Max-Change: 0.02589
Iteration: 6, Log-Lik: -2469.238, Max-Change: 0.02212
Iteration: 7, Log-Lik: -2468.875, Max-Change: 0.01999
Iteration: 8, Log-Lik: -2468.573, Max-Change: 0.01718
Iteration: 9, Log-Lik: -2468.329, Max-Change: 0.01528
Iteration: 10, Log-Lik: -2468.157, Max-Change: 0.01747
Iteration: 11, Log-Lik: -2467.932, Max-Change: 0.01255
Iteration: 12, Log-Lik: -2467.788, Max-Change: 0.01111
Iteration: 13, Log-Lik: -2467.669, Max-Change: 0.01035
Iteration: 14, Log-Lik: -2467.565, Max-Change: 0.00911
Iteration: 15, Log-Lik: -2467.480, Max-Change: 0.00826
Iteration: 16, Log-Lik: -2467.417, Max-Change: 0.00959
Iteration: 17, Log-Lik: -2467.338, Max-Change: 0.00701
Iteration: 18, Log-Lik: -2467.285, Max-Change: 0.00633
Iteration: 19, Log-Lik: -2467.240, Max-Change: 0.00600
Iteration: 20, Log-Lik: -2467.199, Max-Change: 0.00534
Iteration: 21, Log-Lik: -2467.166, Max-Change: 0.00490
Iteration: 22, Log-Lik: -2467.141, Max-Change: 0.00570
Iteration: 23, Log-Lik: -2467.109, Max-Change: 0.00424
Iteration: 24, Log-Lik: -2467.088, Max-Change: 0.00387
Iteration: 25, Log-Lik: -2467.069, Max-Change: 0.00370
Iteration: 26, Log-Lik: -2467.052, Max-Change: 0.00332
Iteration: 27, Log-Lik: -2467.038, Max-Change: 0.00307
Iteration: 28, Log-Lik: -2467.027, Max-Change: 0.00356
Iteration: 29, Log-Lik: -2467.014, Max-Change: 0.00269
Iteration: 30, Log-Lik: -2467.005, Max-Change: 0.00247
Iteration: 31, Log-Lik: -2466.997, Max-Change: 0.00238
Iteration: 32, Log-Lik: -2466.989, Max-Change: 0.00214
Iteration: 33, Log-Lik: -2466.983, Max-Change: 0.00199
Iteration: 34, Log-Lik: -2466.978, Max-Change: 0.00231
Iteration: 35, Log-Lik: -2466.973, Max-Change: 0.00176
Iteration: 36, Log-Lik: -2466.968, Max-Change: 0.00162
Iteration: 37, Log-Lik: -2466.965, Max-Change: 0.00157
Iteration: 38, Log-Lik: -2466.961, Max-Change: 0.00141
Iteration: 39, Log-Lik: -2466.959, Max-Change: 0.00132
Iteration: 40, Log-Lik: -2466.956, Max-Change: 0.00153
Iteration: 41, Log-Lik: -2466.954, Max-Change: 0.00117
Iteration: 42, Log-Lik: -2466.952, Max-Change: 0.00108
Iteration: 43, Log-Lik: -2466.950, Max-Change: 0.00105
Iteration: 44, Log-Lik: -2466.949, Max-Change: 0.00095
Iteration: 45, Log-Lik: -2466.947, Max-Change: 0.00089
Iteration: 46, Log-Lik: -2466.946, Max-Change: 0.00108
Iteration: 47, Log-Lik: -2466.945, Max-Change: 0.00079
Iteration: 48, Log-Lik: -2466.944, Max-Change: 0.00073
Iteration: 49, Log-Lik: -2466.944, Max-Change: 0.00070
Iteration: 50, Log-Lik: -2466.943, Max-Change: 0.00065
Iteration: 51, Log-Lik: -2466.942, Max-Change: 0.00060
Iteration: 52, Log-Lik: -2466.942, Max-Change: 0.00071
Iteration: 53, Log-Lik: -2466.941, Max-Change: 0.00054
Iteration: 54, Log-Lik: -2466.941, Max-Change: 0.00050
Iteration: 55, Log-Lik: -2466.940, Max-Change: 0.00048
Iteration: 56, Log-Lik: -2466.940, Max-Change: 0.00044
Iteration: 57, Log-Lik: -2466.940, Max-Change: 0.00041
Iteration: 58, Log-Lik: -2466.940, Max-Change: 0.00053
Iteration: 59, Log-Lik: -2466.939, Max-Change: 0.00037
Iteration: 60, Log-Lik: -2466.939, Max-Change: 0.00034
Iteration: 61, Log-Lik: -2466.939, Max-Change: 0.00033
Iteration: 62, Log-Lik: -2466.939, Max-Change: 0.00030
Iteration: 63, Log-Lik: -2466.939, Max-Change: 0.00028
Iteration: 64, Log-Lik: -2466.939, Max-Change: 0.00032
Iteration: 65, Log-Lik: -2466.938, Max-Change: 0.00025
Iteration: 66, Log-Lik: -2466.938, Max-Change: 0.00023
Iteration: 67, Log-Lik: -2466.938, Max-Change: 0.00022
Iteration: 68, Log-Lik: -2466.938, Max-Change: 0.00020
Iteration: 69, Log-Lik: -2466.938, Max-Change: 0.00019
Iteration: 70, Log-Lik: -2466.938, Max-Change: 0.00024
Iteration: 71, Log-Lik: -2466.938, Max-Change: 0.00017
Iteration: 72, Log-Lik: -2466.938, Max-Change: 0.00016
Iteration: 73, Log-Lik: -2466.938, Max-Change: 0.00016
Iteration: 74, Log-Lik: -2466.938, Max-Change: 0.00014
Iteration: 75, Log-Lik: -2466.938, Max-Change: 0.00013
Iteration: 76, Log-Lik: -2466.938, Max-Change: 0.00017
Iteration: 77, Log-Lik: -2466.938, Max-Change: 0.00012
Iteration: 78, Log-Lik: -2466.938, Max-Change: 0.00011
Iteration: 79, Log-Lik: -2466.938, Max-Change: 0.00011
Iteration: 80, Log-Lik: -2466.938, Max-Change: 0.00010
anova(mod, mod2) #equal
#>           AIC    SABIC       HQ      BIC    logLik X2 df   p
#> mod  4945.875 4956.265 4957.067 4975.322 -2466.938          
#> mod2 4945.875 4956.266 4957.067 4975.322 -2466.938  0  0 NaN
M2(mod2)
#>             M2 df         p RMSEA RMSEA_5   RMSEA_95      SRMSR      TLI CFI
#> stats 5.292803  9 0.8080735     0       0 0.02254395 0.02242588 1.072506   1
itemfit(mod2)
#>     item  S_X2 df.S_X2 RMSEA.S_X2 p.S_X2
#> 1 Item_1 0.436       2          0  0.804
#> 2 Item_2 1.576       2          0  0.455
#> 3 Item_3 0.872       1          0  0.351
#> 4 Item_4 0.190       2          0  0.909
#> 5 Item_5 0.190       2          0  0.909
coef(mod2, simplify=TRUE)
#> $items
#>        a1     d g u
#> Item_1  1 2.731 0 1
#> Item_2  1 0.999 0 1
#> Item_3  1 0.240 0 1
#> Item_4  1 1.307 0 1
#> Item_5  1 2.100 0 1
#> 
#> $means
#> F1 
#>  0 
#> 
#> $cov
#>       F1
#> F1 0.572
#> 
sqrt(coef(mod2)$GroupPars[2]) #latent SD equal to the slope in mod
#> [1] 0.7561877

# }