Description Usage Arguments Value Author(s) See Also Examples
This functions supplements the cheat
function. It uses classical test methods for computing the probability of choosing the incorrect test option to the ith item.
1 2 3 4 5 |
formula |
an object of class |
data |
an optional data frame, list or environment (or object
coercible by |
dat |
A data frame or matrix with item responses. Implemented only for the default method. |
na.action |
a function which indicates what should happen when the data
contain |
subset |
an optional vector specifying a subset of observations to be used. |
key |
a numeric vector containing the correct resposnes to each test item |
... |
Not implemented |
a list cnotaining the probabilitiy of choosing each incorrect option for each test item appearing on the test.
Harold Doran
See Also as cheat
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | NumStu <- 30
NumItems <- 50
dat <- matrix(0, nrow=NumStu, ncol=NumItems)
set.seed(1234)
for(i in 1:NumStu){
dat[i,] <- sample(1:4, NumItems, replace=TRUE)
}
dat <- data.frame(dat)
## Add in explicit answer copying
dat[(NumStu+1),] <- dat[NumStu,]
dat[(NumStu+2),] <- c(dat[(NumStu-1), 1:25], dat[(NumStu-2), 26:50 ])
## Answer Key
set.seed(1234)
key <- sample(1:4, NumItems, replace=TRUE)
## Formula interface
ff <- as.formula(paste('~', paste( names(dat), collapse= "+")))
mm <- wrongProb(ff, data = dat, key = key)
## Default interface
mm <- wrongProb(dat, key = key)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.