fit_model: Fit Poll Pooling Model

View source: R/utils.R

fit_modelR Documentation

Fit Poll Pooling Model

Description

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

Usage

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/britpol documentation built on Aug. 6, 2023, 2:30 a.m.