Learn R Programming

ShinyItemAnalysis (version 1.3.3)

DDplot: Graphical representation of difficulty and (generalized) discrimination in item analysis

Description

Plots difficulty and (generalized) discrimination for items ordered by difficulty.

Usage

DDplot(data, item.names, k = 3, l = 1, u = 3,
discrim = "ULI", maxscore, minscore, bin = FALSE, cutscore, average.score = FALSE,
thr = 0.2)

Arguments

data

numeric: binary or ordinal data matrix or data frame. See Details.

item.names

character: the names of items.

k

numeric: number of groups to which may be data.frame x divided by the total score. Default value is 3. See Details.

l

numeric: lower group. Default value is 1. See Details.

u

numeric: upper group. Default value is 3. See Details.

discrim

character: type of discrimination index to be calculated. Deafult value is "ULI". See Details.

maxscore

vector or numeric: maximal scores of items. If numeric, the same maximal score is used for all items. If missing, vector of achieved maximal scores is calculated and used in calculations.

minscore

vector or numeric: minimal scores of items. If numeric, the same minimal score is used for all items. If missing, vector of achieved minimal scores is calculated and used in calculations.

bin

logical: should the ordinal data be binarized. Deafult value is FALSE. See Details.

cutscore

vector or numeric: cutscore used to binarize the data.set. If numeric, the same cutscore is used for all items. If missing, vector of maximal scores is used in calculations.

average.score

logical: should average score of the item disaplyed instead of difficulty. Default value is FALSE. See Details.

thr

numeric: value of discrimination threshold. See Details.

Details

The data is a matrix or data frame whose rows represents examinee answers (1 correct, 0 incorrect, or ordinal item scores) and columns correspond to the items.

The item.names argument stands for names of items. If not specified, the names of dataset columns are used. Difficulty and discrimination indices are plotted for each item, items are ordered by their difficulty.

Discrimination is calculated using method specified in discrim. Default option "ULI" calculates difference in ratio of correct answers in upper and lower third of students. "RIT" index caluclates correlation between item score and test total score. "RIR" index caclulates correlation between item score and total score for the rest of the items. With option "none", only difficulty is displayed.

"ULI" index can be generalized using arguments k, l and u. Generalized ULI discrimination is then computed as follows: The function takes data on individuals, computes their total test score and then divides individuals into k groups. The lower and upper group are determined by l and u parameters, i.e. l-th and u-th group where the ordering is defined by increasing total score.

For ordinal data, difficulty is defined as relative score (achieved - minimal)/(maximal - minimal). Minimal score can be specified by minscore, maximal score can be specified by maxscore. Average score of items can be displayed with argument average.score = T. Note that for binary data difficulty estimate is the same as average score of the item.

Binarization of data is allowed in bin, for this purpose cutscore is used.

By rule of thums, discrimination of items should not be lower than 0.2. The value of threshold can be specified via thr argument. In case that thr = NULL, no horizontal line is displayed in the plot.

References

Martinkova, P., Stepanek, L., Drabinova, A., Houdek, J., Vejrazka, M., & Stuka, C. (2017). Semi-real-time analyses of item characteristics for medical school admission tests. In: Proceedings of the 2017 Federated Conference on Computer Science and Information Systems.

See Also

gDiscrim, discrim

Examples

Run this code
# NOT RUN {
# loading 100-item medical admission test data sets
data(dataMedical, dataMedicalgraded)
# binary data set
dataBin <- dataMedical[, 1:100]
# ordinal data set
dataOrd <- dataMedicalgraded[, 1:100]

# DDplot of binary data set
DDplot(dataBin)
# }
# NOT RUN {
#' # DDplot of binary data set without threshold
DDplot(dataBin, thr = NULL)
# compared to DDplot using ordinal data set and 'bin = TRUE'
DDplot(dataOrd, bin = TRUE)
# compared to binarized data set using bin = TRUE and cutscore equal to 3
DDplot(dataOrd, bin = TRUE, cutscore = 3)

# DDplot of binary data using generalized ULI
# discrimination based on 5 groups, comparing 4th and 5th
# threshold lowered to 0.1
DDplot(dataBin, k = 5, l = 4, u = 5, thr = 0.1)

# DDplot of ordinal data set using ULI
DDplot(dataOrd)
# DDplot of ordinal data set using generalized ULI
# discrimination based on 5 groups, comparing 4th and 5th
# threshold lowered to 0.1
DDplot(dataOrd, k = 5, l = 4, u = 5, thr = 0.1)
# DDplot of ordinal data set using RIT
DDplot(dataOrd, discrim = "RIT")
# DDplot of ordinal data set using RIR
DDplot(dataOrd, discrim = "RIR")
# DDplot of ordinal data set disaplaying only difficulty
DDplot(dataBin, discrim = "none")

# DDplot of ordinal data set disaplaying difficulty estimates
DDplot(dataOrd)
# DDplot of ordinal data set disaplaying average item scores
DDplot(dataOrd, average.score = TRUE)
# }

Run the code above in your browser using DataLab