error_calc.pollyvote: calculate the prediction error of a pollyvote prediction.

Description Usage Arguments Value See Also Examples

Description

calculate the prediction error of a pollyvote prediction.

Usage

1
2
## S3 method for class 'pollyvote'
error_calc(object, method, ...)

Arguments

object

[pollyvote(1)]
pollyvote object to get the error calculation from.

method

[character(1)]
method name of the error calculation function of object to use.

...

additional arguments to the error calculation function.

Value

the prediction

See Also

Other predict: error_calc, predict.pollyvote

Examples

1
2
3
4
5
6
7
8
pv = create_pollyvote(perm_countries = "D")
data("polls_individual")
pv = add_data(pv, newdata = polls_individual, country = "D", region = "national", 
              source_type = "poll", election = "BTW")
data("election_result")
pv = add_election_result(pv, "BTW 2013", election_result, date = "2013-09-22")
error_calc_pred <- error_calc(pv, "prediction_election", 
                              prediction = "pollyvote", election = "BTW 2013")   

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