GitHub

R-CMD-check

R package sov calculates vote-specific Shapley-Owen values (vs-SOVs) and traditional Shapely-Owen values (SOVs) for assemblies with weighted voting, various voting thresholds, and different numbers of dimensions.

Description

This program calculates vs-SOVs and traditional SOVs in multidimensional space.

  • vs-SOVs utilize the “observed” normal vectors and their reflections to determine the proportion of times a voter pivots.
  • Traditional SOVs utilize all angles of the vote from 0 to 360 degrees for each dimension greater than 1.
  • The package works for 1 to 4 dimensions, weighted voting, and various voting thresholds.

Voting Thresholds

The package distinguishes between simple and absolute k-majority voting thresholds (Dougherty and Edward 2004):

  • Absolute k-majority: Requires the yeas (weighted or unweighted) to exceed a fixed number q, which treats abstentions as “nays.”
  • Simple k-majority: Requires the ratio of yeas to (yeas + nays) to exceed a proportion pr, thereby it ignores abstentions.

You can toggle between these modes using the absolute argument:

# To set an absolute threshold (e.g., US House majority):
vs_sov(..., absolute = TRUE, q = 218)
# To set a simple threshold (e.g., simple majority of those voting):
vs_sov(..., absolute = FALSE, pr = 0.5001)

Functions vs_sov() and sov() use package-estimated inputs from W-NOMINATE (wnominate), Optimal Classification (oc), or MCMCpack (MCMCpack), with a function identifying which input is provided.

Functions vs_sov_user() and sov_user() use ideal points, and other information, provided by the user.

Installation

You can install the development version of sov from GitHub with:

# install.packages("pak")
pak::pak("emmabbn/sov")
library(sov)

Examples

The following examples provide an overview of the package’s core functions and the type of data that can be used in these examples. We use simplified models to clearly illustrate the geometry of the Shapley-Owen Value (SOV) and vote-specific Shapley-Owen Value (vs-SOV) calculations.

Single-Dimension & vs_sov_user()

Here, we demonstrate the use of vs_sov_user() with the simplest case: three voters in a one-dimensional policy space, voting on two roll calls. We use the user-defined input function, vs_sov_user(), to calculate the vs-SOVs under simple majority rule.

Inputs and Setup

The ideal points and roll call specifications for the first example are set up below. Ideal points are defined at 0.7, 0.0, and -0.7. The normal vectors of the roll calls point to the right (+1) and to the left (-1), respectively.

## --- Ideals: 3 voters in 1D -----------------------------------------------
i1 <- 0.7
i2 <- 0.0
i3 <- -0.7
ideals <- cbind(coord1D = c(i1, i2, i3))
rownames(ideals) <- paste0("i", 1:3)
## --- Normals: 2 roll calls (x+, x-) ---------------------------------------
nv1 <- 1; nv2 <- -1
normals <- cbind(dim1 = c(nv1, nv2))
rownames(normals) <- paste0("RC", 1:2)
## --- Votes: 1=yea, 0=nay --------------------------------------------------
votes <- cbind(
  RC1 = c(1, 0, 0),
  RC2 = c(0, 1, 1)
)
rownames(votes) <- rownames(ideals)
## --- Equal voting weights (each voter's vote is worth 1) -------------------
vw <- rep(1, nrow(ideals))

Estimation

Example 1

As a reminder, this example illustrates a case with three voters in a one-dimensional policy space, voting on two roll calls. We set the required majority (

Read the original on github.com ↗