plotDistractorAnalysis: Function for graphical representation of item distractor...

Description Usage Arguments Details Author(s) Examples

View source: R/plotDistractorAnalysis.R

Description

Plots graphical representation of item distractor analysis with proportions and optional number of groups.

Usage

1
2
plotDistractorAnalysis(data, key, num.groups = 3, item = 1, item.name,
multiple.answers = TRUE, matching = NULL)

Arguments

data

character: data matrix or data frame. See Details.

key

character: answer key for the items.

num.groups

numeric: number of groups to that should be respondents splitted.

item

numeric: the number of item to be plotted.

item.name

character: the name of item.

multiple.answers

logical: should be all combinations plotted (default) or should be answers splitted into distractors. See Details.

matching

numeric: numeric vector. If not provided, total score is calculated and distractor analysis is performed based on it.

Details

This function is graphical representation of DistractorAnalysis function. The scores are calculatede using the item data and key. The respondents are then splitted into the num.groups-quantiles and the proportion of respondents in each quantile is reported with respect to their answers, using all reported combinations (default) or distractors. These proportions are plotted.

The data is a matrix or data frame whose rows represents unscored item response from a multiple-choice test and columns correspond to the items.

The key must be a vector of the same length as ncol(data).

If multiple.answers = TRUE (default) all reported combinations of answers are plotted. If multiple.answers = FALSE all combinations are splitted into distractors and only these are then plotted with correct combination.

Author(s)

Adela Drabinova
Institute of Computer Science, The Czech Academy of Sciences
Faculty of Mathematics and Physics, Charles University
[email protected]

Patricia Martinkova
Institute of Computer Science, The Czech Academy of Sciences
[email protected]

#' @seealso DistractorAnalysis #' @seealso distractor.analysis

Examples

 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
27
28
29
## Not run: 
# loading 100-item medical admission test data
data(dataMedicaltest, dataMedicalkey)
dataBin <- dataMedical[, 1:100]
data <- dataMedicaltest[, 1:100]
key <- unlist(dataMedicalkey)

# Difficulty/Discriminaton plot for medical admission test
DDplot(dataBin)
# item 48 is very hard, thus does not discriminate well
# item 57 discriminates well
# item 32 does not discriminate well

plotDistractorAnalysis(data, key, item = 48, multiple.answers = F)
# correct answer B does not function well
plotDistractorAnalysis(data, key, item = 57, multiple.answers = F)
# all options function well, thus the whole item discriminates well
plotDistractorAnalysis(data, key, item = 32, multiple.answers = F)
# functions well, thus the whole item discriminates well

# distractor analysis plot for item 48, 57 and 32, all combinations
plotDistractorAnalysis(data, key, item = 48)
plotDistractorAnalysis(data, key, item = 57)
plotDistractorAnalysis(data, key, item = 32)

# distractor analysis plot for item 57, all combinations and 6 groups
plotDistractorAnalysis(data, key, num.group = 6, item = 57)

## End(Not run)

patriciamar/ShinyItemAnalysis documentation built on Jan. 14, 2019, 8:53 p.m.