Given a modeling object, extract the Q Matrix

extract_q_matrix(x, ...)

# S3 method for class 'q_matrix'
extract_q_matrix(x, ...)

# S3 method for class 'edina'
extract_q_matrix(x, binary = TRUE, ...)

# Default S3 method
extract_q_matrix(x, ...)

Arguments

x

An edina or q_matrix object

...

Additional parameters

binary

Boolean to indicate whether the Q matrix is shown in dichotomous form or in an estimated form.

Value

A matrix that is either dichotomous or estimated depending on the value of the binary parameter.

Examples

# Q matrix values
x = matrix(c(1, 0, 0, 1), nrow = 2)

# Show Q matrix structure
Q = q_matrix(x)

# Retrieve Q matrix
extract_q_matrix(Q)
#> Q Matrix properties
#>    Items:  2 
#>    Traits:  2 
#>    Identifiable: 
#>  No.
#>       Trait1 Trait2
#> Item1      1      0
#> Item2      0      1