curveScore: Curve a Score

Description Usage Arguments Value Examples

View source: R/curveScore.R

Description

Apply special scoring rule to a set of item scores to get an overall score

Usage

1
2
curveScore(itemScores, itemVals, itemWts, specScor, lookup = NULL,
  subsetnames = NULL, messageLevel = 0)

Arguments

itemScores

a vector or a 1 row data frame containing whole number scores for a set of items

itemVals

a vector or a 1 row data frame containing whole number max scores for a set of items

itemWts

a vector or a 1 row data frame containing whole number weights for a set of items

specScor

a 1 row data frame containing a scoring rule

lookup

a named list of data.frames, each with a score lookup table in it

subsetnames

a vector of names of the subsets in the same order as the item parameters (to be used in lookup tables)

Value

numeric of length 1 representing the curved score (generally on a scale of 0 to 1)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# Sample Data 1
itemScores = c(1,2,1,1,2)
itemVals = c(2,2,2,2,3)
itemWts = c(2,2,2,2,3)
specScor = data.frame(t(c("Extra Credit items", "9",NA,NA,NA,NA)), stringsAsFactors = F)
names(specScor) = c("function",paste0("parameter ",1:5))

# Test Run 1
curveScore(itemScores, itemVals, itemWts, specScor)

# Sample Data 2
specScor2 = data.frame(t(c("Polynomial", ".0005", "2.15", "-2.09", ".92", NA)), stringsAsFactors = F)
names(specScor2) = c("function",paste0("parameter ",1:5))

# Test Run 2
curveScore(itemScores, itemVals, itemWts, specScor2)

debarros/rrttReportBuilder documentation built on April 22, 2018, 6:55 a.m.