fit_m2 {dcm2} | R Documentation |
Model Fit M2 Calculations
Description
Estimate the M2 statistic as described by Liu et al. (2016).
Usage
fit_m2(model, ci = 0.9, ...)
Arguments
model |
An estimated diagnostic classification model. |
ci |
The confidence interval for the RMSEA. |
... |
Unused, for extensibility. |
Value
A data frame containing:
-
m2
: The M2 statistic -
df
: Degrees of freedom for the M2 statistic -
pval
: p-value for the M2 statistic -
rmsea
: Root mean square error of approximation -
ci_lower
: Lower end ofci
interval for RMSEA -
ci_upper
: Upper end ofci
interval for RMSEA -
srmsr
: Standardized root mean square residual
References
Liu, Y., Tian, W., & Xin, T. (2016). An application of
M_2
statistic to evaluate the fit of cognitive diagnostic
models. Journal of Educational and Behavioral Statistics, 41, 3-26.
doi: 10.3102/1076998615621293
Examples
possible_prof <- dcm2::as_binary(ncol(sample_data$q_matrix))
fit_dat <- sample_data$data %>%
tidyr::pivot_wider(names_from = "item_id",
values_from = "score") %>%
dplyr::select(-"resp_id") %>%
as.matrix() %>%
unname()
gdina_mod <- GDINA::GDINA(dat = fit_dat,
Q = data.frame(sample_data$q_matrix),
model = "logitGDINA",
control = list(conv.type = "neg2LL"))
fit_m2(gdina_mod, ci = 0.9)
[Package dcm2 version 1.0.2 Index]