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:

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]