fit | R Documentation |
Calculate relative fit indices (-2LL, AIC, BIC, CAIC, SABIC) and absolute fit indices (M_2
test, RMSEA_2
, SRMSR)
using the modelfit
function in the GDINA
package.
fit(Y, Q, model = "GDINA")
Y |
A required |
Q |
A required binary |
model |
Type of model to be fitted; can be |
An object of class list
. The list contains various fit indices:
The number of parameters.
The Deviance.
The Akaike information criterion.
The Bayesian information criterion.
The consistent Akaike information criterion.
The Sample-size Adjusted BIC.
A vector consisting of M_2
statistic, degrees of freedom, significance level, and RMSEA_2
(Liu, Tian, & Xin, 2016).
The standardized root mean squared residual (SRMSR; Ravand & Robitzsch, 2018).
Haijiang Qin <Haijiang133@outlook.com>
Khaldi, R., Chiheb, R., & Afa, A.E. (2018). Feed-forward and Recurrent Neural Networks for Time Series Forecasting: Comparative Study. In: Proceedings of the International Conference on Learning and Optimization Algorithms: Theory and Applications (LOPAL 18). Association for Computing Machinery, New York, NY, USA, Article 18, 1–6. DOI: 10.1145/3230905.3230946.
Liu, Y., Tian, W., & Xin, T. (2016). An application of M2 statistic to evaluate the fit of cognitive diagnostic models. Journal of Educational and Behavioral Statistics, 41, 3–26. DOI: 10.3102/1076998615621293.
Ravand, H., & Robitzsch, A. (2018). Cognitive diagnostic model of best choice: a study of reading comprehension. Educational Psychology, 38, 1255–1277. DOI: 10.1080/01443410.2018.1489524.
set.seed(123)
library(Qval)
## generate Q-matrix and data to fit
K <- 5
I <- 30
example.Q <- sim.Q(K, I)
IQ <- list(
P0 = runif(I, 0.0, 0.2),
P1 = runif(I, 0.8, 1.0)
)
example.data <- sim.data(Q = example.Q, N = 500, IQ = IQ, model = "GDINA", distribute = "horder")
## calculate fit indices
fit.indices <- fit(Y = example.data$dat, Q = example.Q, model = "GDINA")
print(fit.indices)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.