fit_model: Fit Poll Pooling Model

Description Usage Arguments

View source: R/utils.R

Description

This function provides a simple way to fit a variant of Simon Jackman's "polling the polls" model.

Usage

1
fit_model(data, init, final, party, alpha_init, alpha_final, refresh = 0)

Arguments

data

Raw pollbase data.

init

Initial election date.

final

Final election date.

party

A string reflecting a party. Either "con", "lab", or "lib".

alpha_init

The party's vote share at the initial election.

alpha_final

The party's vote share at the final election.

refresh

How often to report model iterations. Defaults to 0.


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