geodalib / core/src / excessRisk
Function: excessRisk()
excessRisk(
baseValues
,eventValues
):number
[]
Defined in: core/src/mapping/rates.ts:101
Description
Compute excess risk (relative risk), the ratio of the observed rate at a location to some reference rate.
The reference risk (
The expected value (
The relative risk (
If an area matches the (regional) reference rate, the corresponding relative risk is one. Values greater than one suggest an excess, whereas values smaller than one suggest a shortfall. The interpretation depends on the context. For example, in disease analysis, a relative risk larger than one would indicate an area where the prevalence of the disease is greater than would be expected. In regional economics, a location quotient greater than one, suggests employment in a sector that exceeds the local needs, implying an export sector.
In public health, this ratio is known as standardized mortality rate (SMR). In regional economics, when applied to employment sectors, it's called a location quotient (LQ).
Parameters
baseValues
number
[]
The values of base variable.
eventValues
number
[]
The values of event variable.
Returns
number
[]
The rates values.
Example
import { excessRisk } from 'geoda-lib';
const baseValues = [100, 200, 300, 400, 500];
const eventValues = [10, 20, 30, 40, 50];
const rates = excessRisk(baseValues, eventValues);