missQ {cdmTools}R Documentation

Introduce random misspecifications in Q-matrix

Description

Introduces random misspecifications in a Q-matrix. Only binary Q-matrix are supported so far. Useful for simulation studies.

Usage

missQ(Q, qjk, retainJ = 0, Qid = "none", seed = NULL)

Arguments

Q

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

qjk

Number (or proportion, if lower than 1) of q-entries to modify in the Q-matrix.

retainJ

Number of items to retain (i.e., not modify) in the Q-matrix. It will retain the first retainJ items. It is useful for assuring the completeness of the misspecified Q-matrix if the first items conform one or more identity matrices. The default is 0.

Qid

Assure that the generated Q-matrix is generically identifiable. It includes "none" (for no identifiability assurance), "DINA", "DINO", or "others" (for other CDMs identifiability). The default is "none".

seed

A seed for obtaining consistent results. If NULL, no seed is used. The default is NULL.

Value

missQ returns an object of class missQ.

miss.Q

The misspecified Q-matrix (matrix).

Q

The input (true) Q-matrix (matrix).

JK

Number of items measuring each attribute (vector).

Kcor

Tetrachoric correlations among the columns (matrix).

is.Qid

Q-matrix identifiability information (list).

specifications

Function call specifications (list).

Author(s)

Pablo Nájera, Universidad Pontificia Comillas

References

Xu, G., & Shang, Z. (2018). Identifying latent structures in restricted latent class models. Journal of the American Statistical Association, 113, 1284-1295. https://doi.org/10.1080/01621459.2017.1340889

Examples

Kj <- c(15, 10, 0, 5) # 15 one-att, 10 2-atts, 0 3-atts, and 5 four-atts items
Q <- genQ(J = 30, K = 4, Kj = Kj, Qid = "others", seed = 123)
miss.Q <- missQ(Q = Q$gen.Q, qjk = .20, retainJ = 4, seed = 123)

[Package cdmTools version 1.0.5 Index]