polling_multiverse: Create New Polling Universe

View source: R/polling_multiverse.R

polling_multiverseR Documentation

Create New Polling Universe

Description

Polls contain all sorts of uncertainty. But people still read them as if every little shift has some important cause, rather than simply resulting from random chance. This function uses pollbasepro to generate a new synthetic dataset of plausible polling results. These new "polls" line up with the days and sample sizes in the pollbase data. Note: the function doesn't currently account for house effects.

Usage

polling_multiverse(start = NULL, end = NULL)

Arguments

start

The date on which to start your new polling universe, in ymd (YYYY-MM-DD) format.

end

The date on which to end your new polling universe, in ymd (YYYY-MM-DD) format.

Value

A tibble of polling data.

Examples

pollingverse <- polling_multiverse(start = "2017-06-18", end = "2019-12-12")

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