sim.MQ.Rd
simulate certen \(rate\) mis-specifications in the Q-matrix.
sim.MQ(Q, rate, verbose = TRUE)
The Q-matrix (sim.Q
) that need to simulate mis-specifications.
The pecentage of mis-specifications in the\(Q\).
Logical indicating to print information or not. Default is TRUE
An object of class \(matrix\).
library(Qval)
set.seed(123)
Q <- sim.Q(5, 10)
print(Q)
#> A1 A2 A3 A4 A5
#> item 1 0 0 1 0 0
#> item 2 0 0 0 0 1
#> item 3 0 1 0 0 0
#> item 4 0 0 1 0 0
#> item 5 1 0 0 0 0
#> item 6 0 0 0 1 0
#> item 7 1 0 0 0 0
#> item 8 0 1 0 0 0
#> item 9 0 0 0 0 1
#> item 10 0 0 0 1 0
MQ <- sim.MQ(Q, 0.1)
#> rate of mis-specifications = 0.1
#> rate of over-specifications = 0.08
#> rate of under-specifications = 0.02
print(MQ)
#> A1 A2 A3 A4 A5
#> item 1 0 1 1 0 0
#> item 2 0 0 0 0 1
#> item 3 0 1 0 0 0
#> item 4 0 0 1 0 0
#> item 5 0 0 1 0 1
#> item 6 0 0 0 1 0
#> item 7 1 0 0 0 0
#> item 8 0 1 0 0 0
#> item 9 1 0 0 0 1
#> item 10 0 0 0 1 0