Learn R Programming

CDM (version 8.2-6)

din: Parameter Estimation for Mixed DINA/DINO Model

Description

din provides parameter estimation for cognitive diagnosis models of the types ``DINA'', ``DINO'' and ``mixed DINA and DINO''.

Usage

din(data, q.matrix, skillclasses=NULL,
      conv.crit=0.001, dev.crit=10^(-5), maxit=500,
      constraint.guess=NULL, constraint.slip=NULL,
      guess.init=rep(0.2, ncol(data)), slip.init=guess.init,
      guess.equal=FALSE, slip.equal=FALSE, zeroprob.skillclasses=NULL,
      weights=rep(1, nrow(data)), rule="DINA",
      wgt.overrelax=0, wgtest.overrelax=FALSE, param.history=FALSE,
      seed=0, progress=TRUE, guess.min=0, slip.min=0, guess.max=1, slip.max=1)

# S3 method for din print(x, ...)

Value

coef

Estimated model parameters. Note that only freely estimated parameters are included.

item

A data frame giving for each item condensation rule, the estimated guessing and slipping parameters and their standard errors. All entries are rounded to 3 digits.

guess

A data frame giving the estimated guessing parameters and their standard errors for each item.

slip

A data frame giving the estimated slipping parameters and their standard errors for each item.

IDI

A matrix giving the item discrimination index (IDI; Lee, de la Torre & Park, 2012) for each item \(j\) $$ IDI_j=1 - s_j - g_j, $$ where a high IDI corresponds to good test items which have both low guessing and slipping rates. Note that a negative IDI indicates violation of the monotonicity condition \(g_j < 1 - s_j\). See din for help.

itemfit.rmsea

The RMSEA item fit index (see itemfit.rmsea).

mean.rmsea

Mean of RMSEA item fit indexes.

loglike

A numeric giving the value of the maximized log likelihood.

AIC

A numeric giving the AIC value of the model.

BIC

A numeric giving the BIC value of the model.

Npars

Number of estimated parameters

posterior

A matrix given the posterior skill distribution for all respondents. The nth row of the matrix gives the probabilities for respondent n to possess any of the \(2^K\) skill classes.

like

A matrix giving the values of the maximized likelihood for all respondents.

data

The input matrix of binary response data.

q.matrix

The input matrix of the required attributes.

pattern

A matrix giving the skill classes leading to highest endorsement probability for the respective response pattern (mle.est) with the corresponding posterior class probability (mle.post), the attribute classes having the highest occurrence posterior probability given the response pattern (map.est) with the corresponding posterior class probability (map.post), and the estimated posterior for each response pattern (pattern).

attribute.patt

A data frame giving the estimated occurrence probabilities of the skill classes and the expected frequency of the attribute classes given the model.

skill.patt

A matrix given the population prevalences of the skills.

subj.pattern

A vector of strings indicating the item response pattern for each subject.

attribute.patt.splitted

A dataframe giving the skill class of the respondents.

display

A character giving the model specified under rule.

item.patt.split

A matrix giving the splitted response pattern.

item.patt.freq

A numeric vector given the frequencies of the response pattern in item.patt.split.

seed

Used simulation seed for initial parameters

partable

Parameter table which is used for coef and vcov.

vcov.derived

Design matrix for extended set of parameters in vcov.

converged

Logical indicating whether convergence was achieved.

control

Optimization parameters used in estimation

Arguments

data

A required \(N \times J\) data matrix containing the binary responses, 0 or 1, of \(N\) respondents to \(J\) test items, where 1 denotes a correct response and 0 an incorrect one. The nth row of the matrix represents the binary response pattern of respondent n. NA values are allowed.

q.matrix

A required binary \(J \times K\) containing the attributes not required or required, 0 or 1, to master the items. The jth row of the matrix is a binary indicator vector indicating which attributes are not required (coded by 0) and which attributes are required (coded by 1) to master item \(j\).

skillclasses

An optional matrix for determining the skill space. The argument can be used if a user wants less than \(2^K\) skill classes.

conv.crit

A numeric which defines the termination criterion of iterations in the parameter estimation process. Iteration ends if the maximal change in parameter estimates is below this value.

dev.crit

A numeric value which defines the termination criterion of iterations in relative change in deviance.

maxit

An integer which defines the maximum number of iterations in the estimation process.

constraint.guess

An optional matrix of fixed guessing parameters. The first column of this matrix indicates the numbers of the items whose guessing parameters are fixed and the second column the values the guessing parameters are fixed to.

constraint.slip

An optional matrix of fixed slipping parameters. The first column of this matrix indicates the numbers of the items whose slipping parameters are fixed and the second column the values the slipping parameters are fixed to.

guess.init

An optional initial vector of guessing parameters. Guessing parameters are bounded between 0 and 1.

slip.init

An optional initial vector of slipping parameters. Slipping parameters are bounded between 0 and 1.

guess.equal

An optional logical indicating if all guessing parameters are equal to each other. Default is FALSE.

slip.equal

An optional logical indicating if all slipping parameters are equal to each other. Default is FALSE.

zeroprob.skillclasses

An optional vector of integers which indicates which skill classes should have zero probability. Default is NULL (no skill classes with zero probability).

weights

An optional vector of weights for the response pattern. Non-integer weights allow for different sampling schemes.

rule

An optional character string or vector of character strings specifying the model rule that is used. The character strings must be of "DINA" or "DINO". If a vector of character strings is specified, implying an item wise condensation rule, the vector must be of length \(J\), which is the number of items. The default is the condensation rule "DINA" for all items.

wgt.overrelax

A parameter which is relevant when an overrelaxation algorithm is used

wgtest.overrelax

A logical which indicates if the overrelexation parameter being estimated during iterations

param.history

A logical which indicates if the parameter history during iterations should be saved. The default is FALSE.

seed

Simulation seed for initial parameters. A value of zero corresponds to deterministic starting values, an integer value different from zero to random initial values with set.seed(seed).

progress

An optional logical indicating whether the function should print the progress of iteration in the estimation process.

guess.min

Minimum value of guessing parameters to be estimated.

slip.min

Minimum value of slipping parameters to be estimated.

guess.max

Maximum value of guessing parameters to be estimated.

slip.max

Maximum value of slipping parameters to be estimated.

x

Object of class din

...

Further arguments to be passed

Details

In the CDM DINA (deterministic-input, noisy-and-gate; de la Torre & Douglas, 2004) and DINO (deterministic-input, noisy-or-gate; Templin & Henson, 2006) models endorsement probabilities are modeled based on guessing and slipping parameters, given the different skill classes. The probability of respondent \(n\) (or corresponding respondents class \(n\)) for solving item \(j\) is calculated as a function of the respondent's latent response \(\eta_{nj}\) and the guessing and slipping rates \(g_j\) and \(s_j\) for item \(j\) conditional on the respondent's skill class \(\alpha_n\): $$ P(X_{nj}=1 | \alpha_n)=g_j^{(1- \eta_{nj})}(1 - s_j) ^{\eta_{nj}}. $$ The respondent's latent response (class) \(\eta_{nj}\) is a binary number, 0 or 1, where 1 indicates presence of all (rule="DINO") or at least one (rule="DINO") required skill(s) for item \(j\), respectively.

DINA and DINO parameter estimation is performed by maximization of the marginal likelihood of the data. The a priori distribution of the skill vectors is a uniform distribution. The implementation follows the EM algorithm by de la Torre (2009).

The function din returns an object of the class din (see ‘Value’), for which plot, print, and summary methods are provided; plot.din, print.din, and summary.din, respectively.

References

de la Torre, J. (2009). DINA model parameter estimation: A didactic. Journal of Educational and Behavioral Statistics, 34, 115--130.

de la Torre, J., & Douglas, J. (2004). Higher-order latent trait models for cognitive diagnosis. Psychometrika, 69, 333--353.

Lee, Y.-S., de la Torre, J., & Park, Y. S. (2012). Relationships between cognitive diagnosis, CTT, and IRT indices: An empirical investigation. Asia Pacific Educational Research, 13, 333-345.

Rupp, A. A., Templin, J., & Henson, R. A. (2010). Diagnostic Measurement: Theory, Methods, and Applications. New York: The Guilford Press.

Templin, J., & Henson, R. (2006). Measurement of psychological disorders using cognitive diagnosis models. Psychological Methods, 11, 287--305.

See Also

plot.din, the S3 method for plotting objects of the class din; print.din, the S3 method for printing objects of the class din; summary.din, the S3 method for summarizing objects of the class din, which creates objects of the class summary.din; din, the main function for DINA and DINO parameter estimation, which creates objects of the class din.

See the gdina function for the estimation of the generalized DINA (GDINA) model.

For assessment of model fit see modelfit.cor.din and anova.din.

See itemfit.sx2 for item fit statistics.

See discrim.index for computing discrimination indices.

See also CDM-package for general information about this package.

See the NPCD::JMLE function in the NPCD package for joint maximum likelihood estimation of the DINA, DINO and NIDA model.

See the dina::DINA_Gibbs function in the dina package for MCMC based estimation of the DINA model.