gdina.Rd
This function implements the generalized DINA model for dichotomous
attributes (GDINA; de la Torre, 2011) and polytomous attributes
(pGDINA; Chen & de la Torre, 2013, 2018).
In addition, multiple group estimation
is also possible using the gdina
function. This function also
allows for the estimation of a higher order GDINA model
(de la Torre & Douglas, 2004).
Polytomous item responses are treated by specifying a sequential
GDINA model (Ma & de la Torre, 2016; Tutz, 1997).
The simulataneous modeling of skills and misconceptions (bugs) can be
also estimated within the GDINA framework (see Kuo, Chen & de la Torre, 2018;
see argument rule
).
The estimation can also be conducted by posing monotonocity
constraints (Hong, Chang, & Tsai, 2016) using the argument mono.constr
.
Moreover, regularization methods SCAD, lasso, ridge, SCAD-L2 and
truncated \(L_1\) penalty (TLP) for item parameters
can be employed (Xu & Shang, 2018).
Normally distributed priors can be specified for item parameters (item intercepts and item slopes). Note that (for convenience) the prior specification holds simultaneously for all items.
gdina(data, q.matrix, skillclasses=NULL, conv.crit=0.0001, dev.crit=.1, maxit=1000, linkfct="identity", Mj=NULL, group=NULL, invariance=TRUE,method=NULL, delta.init=NULL, delta.fixed=NULL, delta.designmatrix=NULL, delta.basispar.lower=NULL, delta.basispar.upper=NULL, delta.basispar.init=NULL, zeroprob.skillclasses=NULL, attr.prob.init=NULL, attr.prob.fixed=NULL, reduced.skillspace=NULL, reduced.skillspace.method=2, HOGDINA=-1, Z.skillspace=NULL, weights=rep(1, nrow(data)), rule="GDINA", bugs=NULL, regular_lam=0, regular_type="none", regular_alpha=NA, regular_tau=NA, regular_weights=NULL, mono.constr=FALSE, prior_intercepts=NULL, prior_slopes=NULL, progress=TRUE, progress.item=FALSE, mstep_iter=10, mstep_conv=1E-4, increment.factor=1.01, fac.oldxsi=0, max.increment=.3, avoid.zeroprobs=FALSE, seed=0, save.devmin=TRUE, calc.se=TRUE, se_version=1, PEM=TRUE, PEM_itermax=maxit, cd=FALSE, cd_steps=1, mono_maxiter=10, freq_weights=FALSE, optimizer="CDM", ...) # S3 method for gdina summary(object, digits=4, file=NULL, ...) # S3 method for gdina plot(x, ask=FALSE, ...) # S3 method for gdina print(x, ...)
data | A required \(N \times J\) data matrix
containing integer responses, 0, 1, ..., K. Polytomous
item responses are treated by the sequential GDINA model.
|
---|---|
q.matrix | A required integer \(J \times K\) matrix containing attributes not required or required, 0 or 1, to master the items in case of dichotomous attributes or integers in case of polytomous attributes. For polytomous item responses the Q-matrix must also include the item name and item category, see Example 11. |
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 | Convergence criterion for maximum absolute change in item parameters |
dev.crit | Convergence criterion for maximum absolute change in deviance |
maxit | Maximum number of iterations |
linkfct | A string which indicates the link function for the GDINA model.
Options are |
Mj | A list of design matrices and labels for each item.
The definition of |
group | A vector of group identifiers for multiple group
estimation. Default is |
invariance | Logical indicating whether invariance of item parameters
is assumed for multiple group models. If a subset of items should
be treated as noninvariant, then |
method | Estimation method for item parameters (see)
(de la Torre, 2011). The default |
delta.init | List with initial \(\delta\) parameters |
delta.fixed | List with fixed \(\delta\) parameters.
For free estimated parameters |
delta.designmatrix | A design matrix for restrictions on delta. See Example 4. |
delta.basispar.lower | Lower bounds for delta basis parameters. |
delta.basispar.upper | Upper bounds for delta basis parameters. |
delta.basispar.init | An optional vector of starting values for the basis parameters of delta.
This argument only applies when using a designmatrix for delta,
i.e. |
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). |
attr.prob.init | Initial probabilities of skill distribution. |
attr.prob.fixed | Vector or matrix with fixed probabilities of skill distribution. |
reduced.skillspace | A logical which indicates if the latent class skill space dimension
should be reduced (see Xu & von Davier, 2008). The default is |
reduced.skillspace.method | Computation method for skill space reduction
in case of |
HOGDINA | Values of -1, 0 or 1 indicating if a higher order GDINA model (see Details) should be estimated. The default value of -1 corresponds to the case that no higher order factor is assumed to exist. A value of 0 corresponds to independent attributes. A value of 1 assumes the existence of a higher order factor. |
Z.skillspace | A user specified design matrix for the skill space reduction as described in Xu and von Davier (2008). See in the Examples section for applications. See Example 6. |
weights | An optional vector of sample weights. |
rule | A string or a vector of itemwise condensation rules. Allowed entries are
|
bugs | Character vector indicating which columns in the Q-matrix
refer to bugs (misconceptions). This is only available if some |
regular_lam | Regularization parameter \(\lambda\) |
regular_type | Type of regularization. Can be |
regular_alpha | Regularization parameter \(\alpha\) (applicable for elastic net or SCAD-L2. |
regular_tau | Regularization parameter \(\tau\) for truncated \(L_1\) penalty. |
regular_weights | Optional list of item parameter weights used for penalties in regularized estimation (see Example 13) |
mono.constr | Logical indicating whether monotonicity constraints should be fulfilled in estimation (implemented by the increasing penalty method; see Nash, 2014, p. 156). |
prior_intercepts | Vector with mean and standard deviation for prior of random intercepts (applies to all items) |
prior_slopes | Vector with mean and standard deviation for prior of random slopes (applies to all items and all parameters) |
progress | An optional logical indicating whether the function should print the progress of iteration in the estimation process. |
progress.item | An optional logical indicating whether item wise progress should be displayed |
mstep_iter | Number of iterations in M-step if |
mstep_conv | Convergence criterion in M-step if |
increment.factor | A factor larger than 1 (say 1.1) to control maximum increments in item parameters. This parameter can be used in case of nonconvergence. |
fac.oldxsi | A convergence acceleration factor between 0 and 1 which defines the weight of previously estimated values in current parameter updates. |
max.increment | Maximum size of change in increments in M steps
of EM algorithm when |
avoid.zeroprobs | An optional logical indicating whether for estimating
item parameters probabilities occur. Especially if
not a skill classes are used, it is recommended to switch
the argument to |
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 |
save.devmin | An optional logical indicating whether intermediate
estimates should be saved corresponding to minimal deviance.
Setting the argument to |
calc.se | Optional logical indicating whether standard errors should be calculated. |
se_version | Integer for calculation method of standard errors.
|
PEM | Logical indicating whether the P-EM acceleration should be applied (Berlinet & Roland, 2012). |
PEM_itermax | Number of iterations in which the P-EM method should be applied. |
cd | Logical indicating whether coordinate descent algorithm should be used. |
cd_steps | Number of steps for each parameter in coordinate descent algorithm |
mono_maxiter | Maximum number of iterations for fulfilling the monotonicity constraint |
freq_weights | Logical indicating whether frequency weights should
be used. Default is |
optimizer | String indicating which optimizer should be used in
M-step estimation in case of |
object | A required object of class |
digits | Number of digits after decimal separator to display. |
file | Optional file name for a file in which |
x | A required object of class |
ask | A logical indicating whether every separate item should
be displayed in |
... | Optional parameters to be passed to or from other methods will be ignored. |
The estimation is based on an EM algorithm as described in de la Torre (2011).
Item parameters are contained in the delta
vector which is a list where
the \(j\)th entry corresponds to item parameters of the \(j\)th item.
The following description refers to the case of dichotomous attributes. For using polytomous attributes see Chen and de la Torre (2013) and Example 7 for a definition of the Q-matrix. In this case, \(Q_{ik}=l\) means that the \(i\)th item requires the mastery (at least) of level \(l\) of attribute \(k\).
Assume that two skills \(\alpha_1\) and \(\alpha_2\) are required for
mastering item \(j\). Then the GDINA model can be written as
$$ g [ P( X_{nj}=1 | \alpha_n ) ]=\delta_{j0} + \delta_{j1} \alpha_{n1} +
\delta_{j2} \alpha_{n2} + \delta_{j12} \alpha_{n1} \alpha_{n2}
$$
which is a two-way GDINA-model (the rule="GDINA2"
specification) with a
link function \(g\) (which can be the identity, logit or logarithmic link).
If the specification
ACDM
is chosen, then \(\delta_{j12}=0\).
The DINA model (rule="DINA"
) assumes \( \delta_{j1}=\delta_{j2}=0\).
For the reduced RUM model (rule="RRUM"
), the item response model is
$$P(X_{nj}=1 | \alpha_n )=\pi_i^\ast \cdot r_{i1}^{1-\alpha_{i1} }
\cdot r_{i2}^{1-\alpha_{i2} } $$ From this equation, it is obvious, that
this model is equivalent to an additive model (rule="ACDM"
) with
a logarithmic link function (linkfct="log"
).
If a reduced skillspace (reduced.skillspace=TRUE
) is employed, then the
logarithm of probability distribution of the attributes is modeled as a
log-linear model:
$$ \log P[ ( \alpha_{n1}, \alpha_{n2}, \ldots, \alpha_{nK} ) ]
=\gamma_0 + \sum_k \gamma_k \alpha_{nk} +
\sum_{k < l} \gamma_{kl} \alpha_{nk} \alpha_{nl} $$
If a higher order DINA model is assumed (HOGDINA=1
), then a higher order
factor \(\theta_n\) for the attributes is assumed:
$$P( \alpha_{nk}=1 | \theta_n )=\Phi ( a_k \theta_n + b_k ) $$
For HOGDINA=0
, all attributes \(\alpha_{nk}\) are assumed to be
independent of each other:
$$ P[ ( \alpha_{n1}, \alpha_{n2}, \ldots, \alpha_{nK} ) ]
=\prod_k P( \alpha_{nk} ) $$
Note that the noncompensatory reduced RUM (NC-RRUM) according
to Rupp and Templin (2008) is the GDINA model with the arguments
rule="ACDM"
and linkfct="log"
. NC-RRUM can also be
obtained by choosing rule="RRUM"
.
The compensatory RUM (C-RRUM) can be obtained by using the arguments
rule="ACDM"
and linkfct="logit"
.
The cognitive diagnosis model for identifying
skills and misconceptions (SISM; Kuo, Chen & de la Torre, 2018) can be
estimated with rule="SISM"
(see Example 12).
The gdina
function internally parameterizes the GDINA model as
$$ g [ P( X_{nj}=1 | \alpha_n ) ]=\bm{M}_j ( \alpha _n )
\bm{\delta}_j
$$
with item-specific design matrices \(\bm{M}_j (\alpha _n ) \) and item parameters
\(\bm{\delta}_j\). Only those attributes are modelled which correspond
to non-zero entries in the Q-matrix. Because the Q-matrix (in q.matrix
)
and the design matrices (in M_j
; see Example 3) can be
specified by the user, several
cognitive diagnosis models can be estimated. Therefore, some additional extensions
of the DINA model can also be estimated using the gdina
function.
These models include the DINA model with multiple strategies
(Huo & de la Torre, 2014)
An object of class gdina
with following entries
Data frame of item parameters
List with basis item parameters
Standard errors of basis item parameters
Data frame with model implied conditional item probabilities
\(P(X_i=1 | \bm{\alpha})\). These probabilities are displayed
in plot.gdina
.
The RMSEA item fit index (see itemfit.rmsea
).
Mean of RMSEA item fit indexes.
Log-likelihood
Deviance
Number of groups
Sample size
AIC
BIC
CAIC
Total number of parameters
Number of item parameters
Number of parameters for skill class distribution
Number of skill classes
Covariance matrix of \(\delta\) item parameters
Individual posterior distribution
Individual likelihood
Original data
Used Q-matrix
Individual patterns, individual MLE and MAP classifications and their corresponding probabilities
Probabilities of skill classes
Marginal skill probabilities
Individual subject pattern
Splitted attribute pattern
Array of item response probabilities
Design matrix \(M_j\) in GDINA algorithm (see de la Torre, 2011)
Design matrix \(A_j\) in GDINA algorithm (see de la Torre, 2011)
Used condensation rules
Used link function
Designmatrix for item parameters
A logical if skillspace reduction was performed
Design matrix for skillspace reduction
Parameters \(\delta\) for skill class representation
Standard errors of \(\delta\) parameters
Number of iterations
Parameters in the parametrization of the reduced RUM model
if rule="RRUM"
.
Group statistics (sample sizes, group labels)
The used value of HOGDINA
Monotonicity constraint
Logical indicating whether regularization is used
Regularization parameter
Number of items with parameters at boundary of monotonicity constraints
Number of regularized item parameters
List indicating which item parameters are regularized
Logical indicating whether coordinate descent algorithm is used
Number of steps for each parameter in coordinate descent algorithm
Used simulation seed
Attribute parameters \(a_k\) in case of HOGDINA>=0
Attribute parameters \(b_k\) in case of HOGDINA>=0
Attribute response functions. This matrix contains all \(a_k\) and \(b_k\) parameters
Logical indicating whether convergence was achieved.
Optimization parameters used in estimation
Parameter table for gdina
function
Group-wise matrices with polychoric correlations
Logical indicating whether a sequential GDINA model is applied for polytomous item responses
Further values
Berlinet, A. F., & Roland, C. (2012). Acceleration of the EM algorithm: P-EM versus epsilon algorithm. Computational Statistics & Data Analysis, 56(12), 4122-4137.
Chen, J., & de la Torre, J. (2013). A general cognitive diagnosis model for expert-defined polytomous attributes. Applied Psychological Measurement, 37, 419-437.
Chen, J., & de la Torre, J. (2018). Introducing the general polytomous diagnosis modeling framework. Frontiers in Psychology | Quantitative Psychology and Measurement, 9(1474).
de la Torre, J., & Douglas, J. A. (2004). Higher-order latent trait models for cognitive diagnosis. Psychometrika, 69, 333-353.
de la Torre, J. (2011). The generalized DINA model framework. Psychometrika, 76, 179-199.
Hong, C. Y., Chang, Y. W., & Tsai, R. C. (2016). Estimation of generalized DINA model with order restrictions. Journal of Classification, 33(3), 460-484.
Huo, Y., de la Torre, J. (2014). Estimating a cognitive diagnostic model for multiple strategies via the EM algorithm. Applied Psychological Measurement, 38, 464-485.
Kuo, B.-C., Chen, C.-H., & de la Torre, J. (2018). A cognitive diagnosis model for identifying coexisting skills and misconceptions. Applied Psychological Measurement, 42(3), 179-191.
Ma, W., & de la Torre, J. (2016). A sequential cognitive diagnosis model for polytomous responses. British Journal of Mathematical and Statistical Psychology, 69(3), 253-275.
Nash, J. C. (2014). Nonlinear parameter optimization using R tools. West Sussex: Wiley.
Rupp, A. A., & Templin, J. (2008). Unique characteristics of diagnostic classification models: A comprehensive review of the current state-of-the-art. Measurement: Interdisciplinary Research and Perspectives, 6, 219-262.
Shen, X., Pan, W., & Zhu, Y. (2012). Likelihood-based selection and sharp parameter estimation. Journal of the American Statistical Association, 107, 223-232.
Tutz, G. (1997). Sequential models for ordered responses. In W. van der Linden & R. K. Hambleton. Handbook of modern item response theory (pp. 139-152). New York: Springer.
Xu, G., & Shang, Z. (2018). Identifying latent structures in restricted latent class models. Journal of the American Statistical Association, 523, 1284-1295.
Xu, X., & von Davier, M. (2008). Fitting the structured general diagnostic model to NAEP data. ETS Research Report ETS RR-08-27. Princeton, ETS.
Zeng, L., & Xie, J. (2014). Group variable selection via SCAD-\(L_2\). Statistics, 48, 49-66.
Zhang, C.-H. (2010). Nearly unbiased variable selection under minimax concave penalty. Annals of Statistics, 38, 894-942.
The function din
does not allow for multiple group estimation.
Use this gdina
function instead and choose the appropriate rule="DINA"
as an argument.
Standard error calculation in analyses which use sample weights or
designmatrix for delta parameters (delta.designmatrix!=NULL
) is not yet
correctly implemented. Please use replication methods instead.
See also the din
function (for DINA and DINO estimation).
For assessment of model fit see modelfit.cor.din
and
anova.gdina
.
See itemfit.sx2
for item fit statistics.
See sim.gdina
for simulating the GDINA model.
See gdina.wald
for a Wald test for testing the DINA and ACDM
rules at the item-level.
See gdina.dif
for assessing differential item
functioning.
See discrim.index
for computing discrimination indices.
See the GDINA::GDINA
function in the
GDINA package for similar functionality.