negative_deviation: Relative Negative Deviation from a reference

View source: R/general_deficit_assessment.R

negative_deviationR Documentation

Relative Negative Deviation from a reference

Description

The cumulative sum of all negative deviations.

Usage

negative_deviation(data_vector, reference_vector)

Arguments

data_vector

Numeric data vector

reference_vector

Corresponding data of the reference

Details

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.

Value

Numeric value between 0 and 1


KWB-R/kwb.misa documentation built on March 18, 2022, 9:56 a.m.