Learn R Programming

ShinyItemAnalysis (version 1.3.6)

ItemAnalysis: Compute traditional item analysis indices

Description

ItemAnalysis function computes various traditional item analysis indices including difficulty, discrimination and item validity. For ordinal items the difficulty and discrimination indices take into account minimal item score as well as range.

Usage

ItemAnalysis(
  Data,
  criterion = "none",
  k = 3,
  l = 1,
  u = 3,
  maxscore = NULL,
  minscore = NULL,
  cutscore = NULL,
  bin = FALSE,
  data,
  y,
  add.bin
)

Arguments

Data

matrix or data.frame of items to be examined. Rows represent respondents, columns represent items.

criterion

vector of criterion values.

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.

maxscore

numeric or vector: maximal score in ordinal items. If missing, vector of obtained maximal scores is imputed. See Details.

minscore

numeric or vector: minimal score in ordinal items. If missing, vector of obtained minimal scores is imputed. See Details.

cutscore

numeric or vector: cut-score used for binarization of ordinal data. If missing, vector of maximal scores is imputed. See Details.

bin

logical: If TRUE, indices are printed also for binarized data. See Details.

data

deprecated. Use argument Data instead.

y

deprecated. Use argument criterion instead.

add.bin

deprecated. Use argument bin instead.

Value

ItemAnalysis function computes various traditional item analysis indices. Output is a data.frame with following columns:

Difficulty

average score of the item divided by its range.

Mean

average item score.

SD

standard deviation of the item score.

SD.bin

standard deviation of the item score for binarized data.

Prop.max.score

proportion of maximal scores.

Min.score

minimal score specified in minscore; if not provided, observed minimal score.

Max.score

maximal score specified in maxscore; if not provided, observed maximal score.

obs.min

observed minimal score.

obs.max

observed maximal score.

Cut.Score

cut-score specified in cutscore.

gULI

generalized ULI.

gULI.bin

generalized ULI for binarized data.

ULI

discrimination with ULI using the usual parameters (3 groups, comparing 1st and 3rd).

ULI.bin

discrimination with ULI using the usual parameters for binarized data (3 groups, comparing 1st and 3rd).

RIT

item-total correlation (correlation between item score and overall test score).

RIT.bin

item-total correlation for binarized data.

RIR

item-rest correlation (correlation between item score and overall test score without the given item).

RIR.bin

item-rest correlation for binarized data.

Corr.criterion

correlation between item score and criterion criterion.

Corr.criterion.bin

correlation between item score and criterion criterion for binarized data.

Index.val

item validity index calculated as cor(item, criterion) * sqrt(((N - 1) / N) * var(item)), see Allen and Yen (1979, Ch.6.4).

Index.val.bin

item validity index for binarized data.

Index.rel

item reliability index calculated as cor(item, test) * sqrt(((N - 1) / N) * var(item)), see Allen and Yen (1979, Ch.6.4).

Index.rel.bin

item reliability index for binarized data.

Index.rel.drop

item reliability index 'drop' (scored without item).

Index.rel.drop.bin

item reliability index 'drop' (scored without item) for binarized data.

Alpha.drop

Cronbach's alpha without given item. In case of two-item dataset, NAs are returned.

Alpha.drop.bin

Cronbach's alpha without given item, for binarized data. In case of two-item dataset, NAs are returned.

Perc.miss

Percentage of missed responses on the particular item.

Perc.nr

Percentage of respondents that did not reached the item nor the subsequent ones, see recode_nr function for further details.

With bin = TRUE, indices based on binarized dataset are also provided and marked with bin suffix.

Details

For ordinal items the difficulty and discrimination indices take into account minimal item score as well as range.

For calculation of discrimination ULI index, it is possible to specify the number of groups k, and which two groups l and u are to be compared.

In ordinal items, difficulty is calculated as difference of average score divided by range (maximal possible score maxscore minus minimal possible score minscore).

If bin is set to TRUE, item analysis of binarized data is included in the output table. In such a case, cutscore is used for binarization. When binarizing the Data, values greater or equal to cut-score are set to 1, other values are set to 0.

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. https://doi.org/10.15439/2017F380

Allen, M. J. & Yen, W. M. (1979). Introduction to measurement theory. Monterey, CA: Brooks/Cole.

See Also

DDplot, gDiscrim, recode_nr

Examples

Run this code
# NOT RUN {
# loading 100-item medical admission test datasets
data(dataMedical, dataMedicalgraded)
# binary dataset
dataBin <- dataMedical[, 1:100]
# ordinal dataset
dataOrd <- dataMedicalgraded[, 1:100]
# study success is the same for both data sets
StudySuccess <- dataMedical[, 102]

# item analysis for binary data
head(ItemAnalysis(dataBin))
# item analysis for binary data using also study success
head(ItemAnalysis(dataBin, criterion = StudySuccess))

# item analysis for binary data
head(ItemAnalysis(dataOrd))
# item analysis for binary data using also study success
head(ItemAnalysis(dataOrd, criterion = StudySuccess))
# including also item analysis for binarized data
head(ItemAnalysis(dataOrd,
  criterion = StudySuccess, k = 5, l = 4, u = 5,
  maxscore = 4, minscore = 0, cutscore = 4, bin = TRUE
))
# }

Run the code above in your browser using DataLab