genResponses {conquestr} | R Documentation |
Generates response vectors for n
cases to i
items given
known item parameters, person abilities, and (optionally) other inputs.
genResponses(abilities, itemParams, BMatrix = 1, mcarP = 0, perturbP = NULL)
abilities |
A person by latent-dimension matrix of abilities. One column per dimension. |
itemParams |
A list of item params of the structure used in |
BMatrix |
A simplified B-matrix mapping dimensions (columns) to items (rows). Or the integer "1" if items are dichotomous and ability is uni-dimensional. |
mcarP |
A double indicating the proportion of missing data under the MCAR assumption. |
perturbP |
A list, where each element of the list contains a data frame referring to an item. Each data frame is either a 1 * 4 data frame describing the general perturbation to apply to the probabilities for that item (currently developed) or a pair of vectors mapping theta to probabilities (not developed). In the first case - the data frame is in this order:
|
A matrix, n
cases by i
items, of scored item responses.
simplef()
, browseVignettes("conquestr")
myItem <- matrix(c(0, 0, 0, 0, 1, 1, 0, 1), ncol = 4, byrow = TRUE)
myItems <- list(myItem, myItem)
myItems[[2]][2, 2] <- -1 # make the second item delta equal to -1
myResponses <- genResponses(rnorm(100), myItems)