Learn R Programming

blocs: Estimate and Visualize Voting Blocs' Partisan Contributions

This package provides several functions to analyze voting blocs in U.S. elections, implementing the methods described in Grimmer, Marble, and Tanigawa-Lau (2023).

Installation

The blocs package is available to install from CRAN:

install.packages("blocs")

You may also install the development version from GitHub:

# install.packages("devtools")
devtools::install_github("coletl/blocs", dependencies = TRUE)

Copy Link

Version

Install

install.packages('blocs')

Monthly Downloads

248

Version

0.1.1

License

GPL (>= 3)

Maintainer

Cole Tanigawa-Lau

Last Published

April 2nd, 2023

Functions in blocs (0.1.1)

estimate_density

Estimate density
new_vbdf

Constructor for class vbdf
check_vbdf

Validator for class vbdf
new_vbsum

Constructor for vbdf summaries
vb_continuous

Continuous voting bloc analysis
vb_plot

Plot the summary of a voting bloc analysis
vb_difference

Calculate differences in bloc contributions
vb_summary

Summarize uncertainty for a vbdf objects
vb_discrete

Discrete voting bloc analysis
anes

Sample of 2020 ANES cumulative data file
vbdf

Create a vbdf object
wtd_table

Weighted frequency table or proportions