orderQ {cdmTools}R Documentation

Reorder Q-matrix columns

Description

Reorders Q-matrix columns according to a target matrix (e.g., another Q-matrix). Specifically, it provides a reordered Q-matrix which columns show the lowest possible average Tucker index congruent coefficient with the target columns. Reordering a Q-matrix is alike relabeling the attributes and it does not change the model. Useful for simulation studies (e.g., comparing a validated Q-matrix with the generating Q-matrix).

Usage

orderQ(Q, target)

Arguments

Q

A J items x K attributes Q-matrix (matrix or data.frame). This is the Q-matrix that will be reordered.

target

A J items x K attributes Q-matrix (matrix or data.frame). This could be the "true", generating Q-matrix.

Value

orderQ returns an object of class orderQ.

order.Q

The reordered Q-matrix (matrix).

configs

Comparison information between the different column configurations of the Q-matrix and the target Q-matrix, including the average absolute difference and the average Tucker index of factor congruence (matrix). The function will not look for all possible specifications if a perfect match is found.

specifications

Function call specifications (list).

Author(s)

Francisco J. Abad, Universidad Autónoma de Madrid
Pablo Nájera, Universidad Pontificia Comillas

Examples

library(GDINA)
dat <- sim30GDINA$simdat
Q <- sim30GDINA$simQ
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

[Package cdmTools version 1.0.5 Index]