RDINA {cdmTools}R Documentation

Restricted DINA model

Description

Estimation of the restricted deterministic input, noisy "and" gate model (R-DINA; Nájera et al., 2023). In addition to the non-compensatory (i.e., conjunctive) condensation rule of the DINA model, the compensatory (i.e., disjunctive) rule of the DINO model can be also applied (i.e., R-DINO model). The R-DINA/R-DINO model should be only considered for applications involving very small sample sizes (N < 100; Nájera et al., 2023), and model fit evaluation and comparison with competing models (e.g., DINA/DINO, G-DINA) is highly recommended.

Usage

RDINA(
  dat,
  Q,
  gate = "AND",
  att.prior = NULL,
  est = "Brent",
  EM.args = list(maxitr = 1000, conv.crit = 1e-04, init.phi = 0.2, verbose = TRUE),
  tau.alpha = "MAP",
  seed = NULL
)

Arguments

dat

A N individuals x J items (matrix or data.frame). Missing values need to be coded as NA. Caution is advised if missing data are present.

Q

A J items x K attributes Q-matrix (matrix or data.frame).

gate

Either a conjunctive ("AND") or disjunctive ("OR") condensation rule to estimate the RDINA or RDINO model, respectively. Default is "AND".

att.prior

A 2^K attributes vector containing the prior distribution for each latent class. The sum of all elements does not have to be equal to 1, since the vector will be normalized. Default is NULL, which is a uniform prior distribution.

est

Use the Brent's method ("Brent") or the expectation-maximization algorithm ("EM") to estimate the model? Default is "Brent", since it is faster and both algorithms are virtually equivalent for the RDINA/RDINO model.

EM.args

A list of arguments in case the EM algorithm is used to estimate the model:

maxitr

Maximum number of iterations. Default is 1000.

conv.crit

Convergence criterion regarding the maximum absolute change in either the phi parameter estimate or the marginal posterior probabilities of attribute mastery. Default is 0.0001.

init.phi

Initial value for the phi parameter. Default is 0.2.

verbose

Print information after each iteration. Default is TRUE.

tau.alpha

Attribute profile estimator (either "MAP", "EAP", or "MLE") used to calculate the estimated classification accuracy as done with the CA function of the GDINA package (Ma & de la Torre, 2020).

seed

Random number generation seed (e.g., to solve ties in case they occur with MLE or MAP estimation). Default is NULL, which means that no specific seed is used.

Value

RDINA returns an object of class RDINA.

MLE

Estimated attribute profiles with the MLE estimator (matrix).

MAP

Estimated attribute profiles with the MAP estimator (matrix).

EAP

Estimated attribute profiles with the EAP estimator (matrix).

phi

Phi parameter estimate (numeric).

post.probs

A (list) containing the estimates of the posterior probability of each examinee in each latent class (pp), marginal posterior probabilities of attribute mastery (mp), and posterior probability of each latent class (lp).

likelihood

A (list) containing the likelihood of each examinee in each latent class (lik_il) and the model log-likelihood (logLik).

test.fit

Relative model fit indices (list).

class.accu

A (list) containing the classification accuracy estimates at the test-level (tau), latent class-level (tau_l), and attribute-level (tau_k).

specifications

Function call specifications (list).

Author(s)

Pablo Nájera, Universidad Pontificia Comillas

References

Ma, W., & de la Torre, J. (2020). GDINA: An R package for cognitive diagnosis modeling. Journal of Statistical Software, 93(14). https://doi.org/10.18637/jss.v093.i14

Nájera, P., Abad, F. J., Chiu, C.-Y., & Sorrel, M. A. (2023). The Restricted DINA model: A Comprehensive Cognitive Diagnostic Model for Classroom-Level Assessments. Journal of Educational and Behavioral Statistics.

Examples


library(GDINA)
Q <- sim30GDINA$simQ # Q-matrix
K <- ncol(Q)
J <- nrow(Q)
set.seed(123)
GS <- data.frame(guessing = rep(0.2, J), slip = rep(0.2, J))
sim <- simGDINA(20, Q, GS, model = "DINA")
simdat <- sim$dat # Simulated data
simatt <- sim$attribute # Generating attributes
fit.RDINA <- RDINA(simdat, Q) # Apply the GNPC method
ClassRate(fit.RDINA$EAP, simatt) # Check classification accuracy


[Package cdmTools version 1.0.5 Index]