View source: R/general_deficit_assessment.R
negative_deviation | R Documentation |
The cumulative sum of all negative deviations.
negative_deviation(data_vector, reference_vector)
data_vector |
Numeric data vector |
reference_vector |
Corresponding data of the reference |
First the similarity the data vector and the reference vector is calculated. Only complete pairs (no NA values) are used. For each data pair the quotient between data and reference is calcutaled. If data > reference the value is set to 1. All quotients are cumulated (-> absolute similarity). This can be maximum the number of data pairs. When deviding by the number of data pairs, the relative similarity is obtained. One minus the relative similarity is the negative deviation.
Numeric value between 0 and 1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.