general.volatility: Generalized electoral volatility

Description Usage Arguments

View source: R/ev.r

Description

Function that can be used to calculate several measures of electoral volatility. Default settings calculate Pedersen volatility.

Usage

1
2
general.volatility(x, c = 1, exp = 1, denom = "sum", difference = T,
  ratio = F, max = F)

Arguments

x

a numeric dataframe or matrix providing voteshare of each party. Columns are denote years and rows denote parties

c

a constant that the output is multiplied by. Can be used to change the scale of the output

exp

the exponent that the measure of disproportionality is raised to. Pedersen volatility is produced when this is set to one

denom

this parameter determines what is used as the denominator in calculating volatility. can be either "mean" or "sum". If set to mean, then the output is divided by the number of parties. If set to sum, it is left as one.

difference

a logical variable. If true then the difference between voteshares from the current year and the previous year is used year is used

ratio

a logical variable. If true then the ratio of voteshares from the current and previous year is used.

max

logical variable. If true then only the maximum ratio or difference is reported.


marko363/ev documentation built on May 21, 2019, 12:22 p.m.