estQ {cdmTools} | R Documentation |
Empirical Q-matrix estimation
Description
Empirical Q-matrix estimation based on the discrete factor loading method (Wang, Song, & Ding, 2018) as used in Nájera, Abad, and Sorrel (2021).
Apart from the conventional dichotomization criteria, the procedure based on loading differences described in Garcia-Garzon, Abad, and Garrido (2018) is also available.
Furthermore, the bagging bootstrap implementation (Xu & Shang, 2018) can be applied; it is recommended when working with small sample sizes.
The psych
package (Revelle, 2020) is used for estimating the required exploratory factor analysis (EFA).
Usage
estQ(
r,
K,
n.obs = NULL,
criterion = "row",
boot = FALSE,
efa.args = list(cor = "tet", rotation = "oblimin", fm = "uls"),
boot.args = list(N = 0.8, R = 100, verbose = TRUE, seed = NULL)
)
Arguments
r |
A correlation matrix or raw data ( |
K |
Number of attributes to use. |
n.obs |
Number of individuals if |
criterion |
Dichotomization criterion to transform the factor loading matrix into the Q-matrix. The possible options include |
boot |
Apply the bagging bootstrap implementation? Only available if |
efa.args |
A list of arguments for the EFA estimation:
|
boot.args |
A list of arguments for the bagging bootstrap implementation (ignored if
|
Value
estQ
returns an object of class estQ
.
est.Q
Estimated Q-matrix (
matrix
).efa.loads
Factor loading matrix (
matrix
).efa.comm
EFA communalities (
vector
).efa.fit
EFA model fit indices (
vector
).boot.Q
Bagging bootstrap Q-matrix before dichotomization. Only if
boot = TRUE
(matrix
).is.Qid
Q-matrix identifiability information (
list
).specifications
Function call specifications (
list
).
Author(s)
Pablo Nájera, Universidad Pontificia Comillas
References
Garcia-Garzon, E., Abad, F. J., & Garrido, L. E. (2018). Improving bi-factor exploratory modelling: Empirical target rotation based on loading differences. Methodology, 15, 45–55. https://doi.org/10.1027/1614-2241/a000163
Nájera, P., Abad, F. J., & Sorrel, M. A. (2021). Determining the number of attributes in cognitive diagnosis modeling. Frontiers in Psychology, 12:614470. https://doi.org/10.3389/fpsyg.2021.614470
Revelle, W. (2019). psych: Procedures for Psychological, Psychometric, and Personality Research. R package version 1.9.12. https://CRAN.R-project.org/package=psych.
Wang, W., Song, L., & Ding, S. (2018). An exploratory discrete factor loading method for Q-matrix specification in cognitive diagnosis models. In: M. Wilberg, S. Culpepper, R. Janssen, J. Gonzalez, & D. Molenaar (Eds.), Quantitative Psychology. IMPS 2017. Springer Proceedings in Mathematics & Statistics (Vol. 233, pp. 351–362). Springer.
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
library(GDINA)
dat <- sim30GDINA$simdat
Q <- sim30GDINA$simQ
#------------------------------
# Using default specifications
#------------------------------
sugQ1 <- estQ(r = dat, K = 5) # Estimate Q-matrix
sugQ1$est.Q <- orderQ(sugQ1$est.Q, Q)$order.Q # Reorder Q-matrix attributes
mean(sugQ1$est.Q == Q) # Check similarity with the generating Q-matrix
#------------------------------------
# Using the bagging bootstrap method
#------------------------------------
# In boot.args argument, R >= 100 is recommended (R = 20 is here used for illustration purposes)
sugQ2 <- estQ(r = dat, K = 5, boot = TRUE, boot.args = list(R = 20, seed = 123)) # Estimate Q-matrix
sugQ2$est.Q <- orderQ(sugQ2$est.Q, Q)$order.Q # Reorder Q-matrix attributes
sugQ2$boot.Q # Proportion of replicas a q-entry was specified in the estimated Q-matrix
mean(sugQ2$est.Q == Q) # Check similarity with the generating Q-matrix