Description Usage Arguments Details Author(s) Examples
View source: R/DistractorAnalysis.R
Performs distractor analysis for each item and optional number of groups.
1 2 3 4 5 6 7 8 9 10 11 12 | DistractorAnalysis(
Data,
key,
p.table = FALSE,
num.groups = 3,
criterion = NULL,
crit.discrete = FALSE,
cut.points,
data,
matching,
match.discrete
)
|
Data |
character: data matrix or data.frame with rows representing unscored item responses from a multiple-choice test and columns corresponding to the items. |
key |
character: answer key for the items. The |
p.table |
logical: should the function return the proportions? If
|
num.groups |
numeric: number of groups to which are the respondents split. |
criterion |
numeric: numeric vector. If not provided, total score is calculated and distractor analysis is performed based on it. |
crit.discrete |
logical: is |
cut.points |
numeric: numeric vector specifying cut points of
|
data |
deprecated. Use argument |
matching |
deprecated. Use argument |
match.discrete |
deprecated. Use argument |
This function is an adapted version of the
distractor.analysis function from CTT package. In
case that no criterion is provided, the scores are calculated using the
item Data and key. The respondents are by default split
into the num.groups-quantiles and the number (or proportion) of
respondents in each quantile is reported with respect to their answers. In
case that criterion is discrete (crit.discrete = TRUE),
criterion is split based on its unique levels. Other cut points
can be specified via cut.points argument.
Adela Hladka
Institute of Computer Science of the Czech Academy of Sciences
hladka@cs.cas.cz
Patricia Martinkova
Institute of Computer Science of the Czech Academy of Sciences
martinkova@cs.cas.cz
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | # loading 100-item medical admission test dataset
data(dataMedicaltest, dataMedicalkey)
data <- dataMedicaltest[, 1:100]
dataBin <- dataMedical[, 1:100]
key <- unlist(dataMedicalkey)
# distractor analysis for dataMedicaltest dataset
DistractorAnalysis(data, key)
## Not run:
# distractor analysis for dataMedicaltest dataset with proportions
DistractorAnalysis(data, key, p.table = TRUE)
# distractor analysis for dataMedicaltest dataset for 6 groups
DistractorAnalysis(data, key, num.group = 6)
# distractor analysis for dataMedicaltest using specified criterion
criterion <- round(rowSums(databin), -1)
DistractorAnalysis(data, key, criterion = criterion)
# distractor analysis for dataMedicaltest using discrete criterion
DistractorAnalysis(data, key, criterion = criterion, crit.discrete = TRUE)
# distractor analysis for dataMedicaltest using groups specified by cut.points
DistractorAnalysis(data, key, cut.points = seq(10, 100, 10))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.