if (FALSE) {
#############################################################################
# EXAMPLE 1: Absolute model fit
#############################################################################
data(sim.dina, package="CDM")
data(sim.qmatrix, package="CDM")
#*** Model 1: DINA model for DINA simulated data
mod1 <- CDM::din( sim.dina, q.matrix=sim.qmatrix, rule="DINA" )
fmod1 <- CDM::IRT.modelfit( mod1 )
summary(fmod1)
## Test of Global Model Fit
## type value p
## 1 max(X2) 8.728 0.113
## 2 abs(fcor) 0.143 0.080
##
## Fit Statistics
## est
## MADcor 0.030
## SRMSR 0.040
## 100*MADRESIDCOV 0.671
## MADQ3 0.062
## MADaQ3 0.059
#*** Model 2: GDINA model
mod2 <- CDM::gdina( sim.dina, q.matrix=sim.qmatrix, rule="GDINA" )
fmod2 <- CDM::IRT.modelfit( mod2 )
summary(fmod2)
## Test of Global Model Fit
## type value p
## 1 max(X2) 2.397 1
## 2 abs(fcor) 0.078 1
##
## Fit Statistics
## est
## MADcor 0.023
## SRMSR 0.030
## 100*MADRESIDCOV 0.515
## MADQ3 0.075
## MADaQ3 0.071
}
Run the code above in your browser using DataLab