fit_m2 | R Documentation |
Estimate the M2 statistic as described by Liu et al. (2016).
fit_m2(model, ci = 0.9, ...)
model |
An estimated diagnostic classification model. |
ci |
The confidence interval for the RMSEA. |
... |
Unused, for extensibility. |
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 of ci
interval for RMSEA
ci_upper
: Upper end of ci
interval for RMSEA
srmsr
: Standardized root mean square residual
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.
\Sexpr[results=rd]{tools:::Rd_expr_doi("10.3102/1076998615621293")}
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.