dropScores: Compute aggregate score after dropping low components

View source: R/drop.R

dropScoresR Documentation

Compute aggregate score after dropping low components

Description

Given a set of scores, max possible scores, and number of scores that may be dropped, this computes the best set of scores to drop, where best means that it produces the largest average of remaining scores.

Usage

dropScores(score, possible, drop = 0, value = c("proportion",
  "percent", "drops"))

Arguments

score

a vector or matrix of item scores

possible

a vector or matrix of maximum possible scores for each item

drop

the number of items which may be dropped

value

the type of return value desired.

Details

The algorithm is based on ideas in a paper by Daniel M. Kane and Jonathan M. Kane available at http://cseweb.ucsd.edu/~dakane/droplowest.pdf.

Value

either the post-drop average (percent or proportion) or a vector of indices indicating which items are to be dropped depending the value of value.

Examples

score <- c(80, 30, 2)
possible <- c(100, 100, 20)
dropScores( score, possible, drop = 1)
dropScores( score, possible, drop = 1, value = "percent")
# Note: second score is dropped, not the third.
dropScores( score, possible, drop = 1, value = "drops")
sum( score[c(1,3)] ) / sum( possible[c(1,3)] )
sum( score[c(1,2)] ) / sum( possible[c(1,2)] )

rpruim/grading documentation built on May 4, 2023, 7:28 a.m.