Description Usage Arguments Value Author(s) Examples
Function prod_qmat1 produces a weight matrix for the LLTM (e.g. estimable with package eRm) e.g. for the examination of position effects. Function is very restricted and assumes a data matrix with special colnames for producing the Q matrix. Warning: function does not proof Q for full rank!
1 | prod_qmat1(virtdat, nr_itemstem, nr_pos)
|
virtdat |
data matrix with "virtual items" (e.g. resulting from function virtblock), data matrix has to be 0/1 matrix and colnames must have the form 'it30_pos4' that is the number of item and the number of position |
nr_itemstem |
number of item stems |
nr_pos |
number of different positions |
qmat weight matrix (warning: check for full rank!)
Christine Hohensinn
1 2 3 4 5 6 7 8 9 10 11 12 | library(DataprepMisc)
it1 <- c(rep(1,5),rep(NA,7))
it2 <- c(rep(NA,5),rep(0,4), rep(NA,3))
it3 <- c(rep(NA,9),rep(0,3))
it4 <- c(rep(NA,5),rep(0,4), rep(NA,3))
it5 <- c(rep(1,5), rep(NA,7))
it6 <- c(rep(NA, 9), rep(1,3))
exqd <- cbind(it1,it2, it3, it4, it5, it6)
colnames(exqd) <- c("it1_pos1", "it1_pos2", "it1_pos3", "it2_pos1", "it2_pos2", "it2_pos3")
prod_qmat1(exqd, 2,3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.