swing: Compute Two-Party Swing

Description Usage Arguments Examples

View source: R/swing.R

Description

This convenience function takes two numeric vectors of vote share data and returns the estimated two-party swing.

Usage

1
swing(a1, a2, b1, b2, type = "butler")

Arguments

a1

Party A vote share at time 1.

a2

Party A vote share at time 2.

b1

Party B vote share at time 1.

b2

Party B vote share at time 2.

type

Which swing calculation to use. Either "butler" or "steed". Defaults to "butler".

Examples

1
2
3
4
## Not run: 
swing(a1 = .5, a2 = .4, b1 = .5, b2 = .6, type = "butler")

## End(Not run)

jackobailey/PollBasePro documentation built on Nov. 26, 2021, 7:41 p.m.