Ability tests are typically multiple choice with one right answer. score.multiple.choice takes a scoring key and a data matrix (or data.frame) and finds total or average number right for each participant. Basic test statistics (alpha, average r, item means, item-whole correlations) are also reported.
score.multiple.choice(key, data, score = TRUE, totals = FALSE, ilabels = NULL, missing = TRUE, impute = "median", digits = 2,short=TRUE,skew=FALSE)
| key | A vector of the correct item alternatives |
|---|---|
| data | a matrix or data frame of items to be scored. |
| score | score=FALSE, just convert to right (1) or wrong (0). score=TRUE, find the totals or average scores and do item analysis |
| totals | total=FALSE: find the average number correct total=TRUE: find the total number correct |
| ilabels | item labels |
| missing | missing=TRUE: missing values are replaced with means or medians missing=FALSE missing values are not scored |
| impute | impute="median", replace missing items with the median score impute="mean": replace missing values with the item mean |
| digits | How many digits of output |
| short | short=TRUE, just report the item statistics, short=FALSE, report item statistics and subject scores as well |
| skew | Should the skews and kurtosi of the raw data be reported? Defaults to FALSE because what is the meaning of skew for a multiple choice item? |
Basically combines score.items with a conversion from multiple choice to right/wrong.
The item-whole correlation is inflated because of item overlap.
The example data set is taken from the Synthetic Aperture Personality Assessment personality and ability test at http://test.personality-project.org.
Subject scores on one scale
Number of missing items for each subject
scoring key, response frequencies, item whole correlations, n subjects scored, mean, sd, skew, kurtosis and se for each item
Cronbach's coefficient alpha
Average interitem correlation
data(iqitems) iq.keys <- c(4,4,4, 6,6,3,4,4, 5,2,2,4, 3,2,6,7) score.multiple.choice(iq.keys,iqitems)#> Call: score.multiple.choice(key = iq.keys, data = iqitems) #> #> (Unstandardized) Alpha: #> [1] 0.84 #> #> Average item correlation: #> [1] 0.25 #> #> item statistics #> key 0 1 2 3 4 5 6 7 8 miss r n mean #> reason.4 4 0.05 0.05 0.11 0.10 0.64 0.03 0.02 0.00 0.00 0 0.59 1523 0.64 #> reason.16 4 0.04 0.06 0.08 0.10 0.70 0.01 0.00 0.00 0.00 0 0.53 1524 0.70 #> reason.17 4 0.05 0.03 0.05 0.03 0.70 0.03 0.11 0.00 0.00 0 0.59 1523 0.70 #> reason.19 6 0.04 0.02 0.13 0.03 0.06 0.10 0.62 0.00 0.00 0 0.56 1523 0.62 #> letter.7 6 0.05 0.01 0.05 0.03 0.11 0.14 0.60 0.00 0.00 0 0.58 1524 0.60 #> letter.33 3 0.06 0.10 0.13 0.57 0.04 0.09 0.02 0.00 0.00 0 0.56 1523 0.57 #> letter.34 4 0.04 0.09 0.07 0.11 0.61 0.05 0.02 0.00 0.00 0 0.59 1523 0.61 #> letter.58 4 0.06 0.14 0.09 0.09 0.44 0.16 0.01 0.00 0.00 0 0.58 1525 0.44 #> matrix.45 5 0.04 0.01 0.06 0.14 0.18 0.53 0.04 0.00 0.00 0 0.51 1523 0.53 #> matrix.46 2 0.04 0.12 0.55 0.07 0.11 0.06 0.05 0.00 0.00 0 0.52 1524 0.55 #> matrix.47 2 0.04 0.05 0.61 0.07 0.11 0.06 0.06 0.00 0.00 0 0.55 1523 0.61 #> matrix.55 4 0.04 0.02 0.18 0.14 0.37 0.07 0.18 0.00 0.00 0 0.45 1524 0.37 #> rotate.3 3 0.04 0.03 0.04 0.19 0.22 0.15 0.05 0.12 0.15 0 0.51 1523 0.19 #> rotate.4 2 0.04 0.03 0.21 0.05 0.18 0.04 0.04 0.25 0.15 0 0.56 1523 0.21 #> rotate.6 6 0.04 0.22 0.02 0.05 0.14 0.05 0.30 0.04 0.14 0 0.55 1523 0.30 #> rotate.8 7 0.04 0.03 0.21 0.07 0.16 0.05 0.13 0.19 0.13 0 0.48 1524 0.19 #> sd #> reason.4 0.48 #> reason.16 0.46 #> reason.17 0.46 #> reason.19 0.49 #> letter.7 0.49 #> letter.33 0.50 #> letter.34 0.49 #> letter.58 0.50 #> matrix.45 0.50 #> matrix.46 0.50 #> matrix.47 0.49 #> matrix.55 0.48 #> rotate.3 0.40 #> rotate.4 0.41 #> rotate.6 0.46 #> rotate.8 0.39#just convert the items to true or false iq.tf <- score.multiple.choice(iq.keys,iqitems,score=FALSE) describe(iq.tf) #compare to previous results#> vars n mean sd median trimmed mad min max range skew kurtosis #> reason.4 1 1523 0.64 0.48 1 0.68 0 0 1 1 -0.58 -1.66 #> reason.16 2 1524 0.70 0.46 1 0.75 0 0 1 1 -0.86 -1.26 #> reason.17 3 1523 0.70 0.46 1 0.75 0 0 1 1 -0.86 -1.26 #> reason.19 4 1523 0.62 0.49 1 0.64 0 0 1 1 -0.47 -1.78 #> letter.7 5 1524 0.60 0.49 1 0.62 0 0 1 1 -0.41 -1.84 #> letter.33 6 1523 0.57 0.50 1 0.59 0 0 1 1 -0.29 -1.92 #> letter.34 7 1523 0.61 0.49 1 0.64 0 0 1 1 -0.46 -1.79 #> letter.58 8 1525 0.44 0.50 0 0.43 0 0 1 1 0.23 -1.95 #> matrix.45 9 1523 0.53 0.50 1 0.53 0 0 1 1 -0.10 -1.99 #> matrix.46 10 1524 0.55 0.50 1 0.56 0 0 1 1 -0.20 -1.96 #> matrix.47 11 1523 0.61 0.49 1 0.64 0 0 1 1 -0.47 -1.78 #> matrix.55 12 1524 0.37 0.48 0 0.34 0 0 1 1 0.52 -1.73 #> rotate.3 13 1523 0.19 0.40 0 0.12 0 0 1 1 1.55 0.40 #> rotate.4 14 1523 0.21 0.41 0 0.14 0 0 1 1 1.40 -0.03 #> rotate.6 15 1523 0.30 0.46 0 0.25 0 0 1 1 0.88 -1.24 #> rotate.8 16 1524 0.19 0.39 0 0.11 0 0 1 1 1.62 0.63 #> se #> reason.4 0.01 #> reason.16 0.01 #> reason.17 0.01 #> reason.19 0.01 #> letter.7 0.01 #> letter.33 0.01 #> letter.34 0.01 #> letter.58 0.01 #> matrix.45 0.01 #> matrix.46 0.01 #> matrix.47 0.01 #> matrix.55 0.01 #> rotate.3 0.01 #> rotate.4 0.01 #> rotate.6 0.01 #> rotate.8 0.01