DistractorAnalysis {ShinyItemAnalysis} | R Documentation |
Distractor analysis
Description
Performs distractor analysis for each item and optional number of groups.
Usage
DistractorAnalysis(
Data,
key,
item = "all",
p.table = FALSE,
num.groups = 3,
criterion = NULL,
crit.discrete = FALSE,
cut.points,
data,
matching,
match.discrete
)
Arguments
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 |
item |
numeric or character: either character |
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 |
Details
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.
Author(s)
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
Examples
Data <- dataMedicaltest[, 1:100]
Databin <- dataMedical[, 1:100]
key <- dataMedicalkey
# distractor analysis for all items
DistractorAnalysis(Data, key)
# distractor analysis for item 1
DistractorAnalysis(Data, key, item = 1)
## Not run:
# distractor analysis with proportions
DistractorAnalysis(Data, key, p.table = TRUE)
# distractor analysis for 6 groups
DistractorAnalysis(Data, key, num.group = 6)
# distractor analysis using specified criterion
criterion <- round(rowSums(Databin), -1)
DistractorAnalysis(Data, key, criterion = criterion)
# distractor analysis using discrete criterion
DistractorAnalysis(Data, key, criterion = criterion, crit.discrete = TRUE)
# distractor analysis using groups specified by cut.points
DistractorAnalysis(Data, key, cut.points = seq(10, 96, 10))
## End(Not run)