DSI2: Calculate the Disease severity Index (DSI) (frequency of each class)
Description
This function calculates the Disease Severity Index (DSI) given a vector of classes,
a vector of frequencies, and a maximum possible class value. The DSI is calculated
as a weighted sum of class values, where each class is multiplied by its corresponding
frequency, then divided by the product of the total frequency and maximum class value,
and finally multiplied by 100 to get a percentage.
Usage
DSI2(class, freq, max)
Value
Returns a single numeric value representing the DSI.
Arguments
class
A numeric vector representing the classes.
freq
A numeric vector representing the frequency of each class.
Must be the same length as 'class'.
max
A numeric value representing the maximum possible class value.