iqv: Index of Qualitative Variation

Description Usage Arguments Examples

View source: R/iqv.R

Description

A simple index of qualitative variation based on the equation in http://bit.ly/2qThZgd. The equation is:

IQV = \frac{k(100^2 - ∑ p^2)}{100^2(k-1)}

Usage

1
iqv(x)

Arguments

x

a dataframe with columns of counts for each k category

Examples

1
2
3
4
5
years_by_state <- reshape2::dcast(testdata, CVE_ENT ~ yearsquant)
iqv(years_by_state)

# IQV per state
apply(years_by_state, 1, iqv)

prestevez/victim documentation built on Jan. 30, 2020, 7:16 p.m.