initial_error_calc_prediction_election: initial pollyvote error calculation

Description Usage Arguments Value

Description

internal function which intializes a function for error calculation of method 'prediction_election'. This means, that one election result of the pollyvote container is compared with the result of a prediction function of the same pollyvote container.

Usage

1
2
3
initial_error_calc_prediction_election(pv, prediction = "pollyvote",
  target_election_year = NULL, ci = FALSE, alpha = 0.05, no_days = Inf,
  moving_average = TRUE, days_average = 7, ...)

Arguments

pv

[pollyvote]
the pollyvote object of which to get the prediction from.

prediction

[character(1)]
the name of the prediction function

target_election_year

[integer(1)]
the election year for which confidence intervals are calculated. If target_election_year is NULL, CI are calculated for the last known election.

ci

[logical(1)]
whether confidence interval should be calculated

alpha

[numeric(1)]
significance level

no_days

[character(1)]

days_average

length of moving average

...

[list()]
additional arguments, currently ignored.

Value

data frame containing the results


pollyvote/pollyvoter documentation built on May 25, 2019, 11:23 a.m.