Provides a way to create an object as a "q_matrix"
.
q_matrix(x)
x | Either a |
---|
A q_matrix
object.
# Q matrix values x = matrix(c(1, 0, 0, 1), nrow = 2) # Q matrix wrapper q_mat = q_matrix(x) # View the converted Q matrix q_mat#> A q matrix: 2 x 2 #> Strictly Identified:#>#> Generically Identified:#>#> Trait1 Trait2 #> Item1 1 0 #> Item2 0 1# Data Frame encoding of Q q_df = data.frame( k1 = c(1, 0), k2 = c(0, 1) ) # Create a Q matrix q_mat = q_matrix(q_df)