Creates a random Q matrix containing three identity matrices after row permutation

random_Q(J, K)

Arguments

J

An int that represents the number of items

K

An int that represents the number of attributes/skills

Value

A dichotomous matrix for Q.

Examples

random_Q(15,4)
#>       [,1] [,2] [,3] [,4]
#>  [1,]    0    1    0    0
#>  [2,]    1    0    0    0
#>  [3,]    1    0    0    0
#>  [4,]    0    0    1    0
#>  [5,]    0    0    1    0
#>  [6,]    1    0    0    0
#>  [7,]    0    0    0    1
#>  [8,]    0    1    0    0
#>  [9,]    0    1    0    0
#> [10,]    0    0    1    0
#> [11,]    0    1    1    1
#> [12,]    0    1    0    0
#> [13,]    1    1    1    1
#> [14,]    0    0    0    1
#> [15,]    0    0    0    1