RealScores2IntegerScores {localScore} | R Documentation |
Convert a real scores vector into an integer scores vector
Description
Convert real scores into integer scores
Usage
RealScores2IntegerScores(RealScore, ProbRealScore, coef = 10)
Arguments
RealScore |
vector of real scores |
ProbRealScore |
vector of probability |
coef |
coefficient |
Details
Convert real scores into integer scores by multiplying real scores by a coefficient (default 10) and then assigning probability to corresponding extended (from the minimum to the maximum) integer scores
Value
list containing ExtendedIntegerScore and ProbExtendedIntegerScore
Examples
score <- c(-1,-0.5,0,0.5,1)
prob.score <- c(0.2,0,0.4,0.1,0.3)
(res1 <- RealScores2IntegerScores(score, prob.score, coef=10))
prob.score.err <- c(0.1,0,0.4,0.1,0.3)
(res2 <- RealScores2IntegerScores(score, prob.score.err, coef=10))
# When coef=1, the function can handle integer scores
ex.integer.score <- c(-3,-1,0,1, 5)
(res3 <- RealScores2IntegerScores(ex.integer.score, prob.score, coef=1))
[Package localScore version 1.0.11 Index]