swing: Compute Two-Party Swing

View source: R/swing.R

swingR Documentation

Compute Two-Party Swing

Description

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

Usage

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

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

## End(Not run)

jackobailey/britpol documentation built on Aug. 6, 2023, 2:30 a.m.