prediction: Point estimate function for football predictions

Description Usage Arguments Value Examples

View source: R/predictions.R

Description

This function returns point estimates for the number of home and away goals in matches for one specified team.

Usage

1
prediction(data, estimate, teamname, method = "future")

Arguments

data

Output of all_game_data with parameter team = NA

estimate

Output of estimate_params using the same data

teamname

The name of the team of interest as a string

method

Optional parameter which takes the values "all", "past" or "future" to filter predictions

Value

A description of the columns of both prediction data frames, upcoming and future:

Comment A simple warning if the prediction may not be accurate
Home Estimate Prediction of the number of goals scored by the home team, rounded to nearest integer
Away Estimate Prediction of the number of goals scored by the away team, rounded to nearest integer
Final Score The full time score for past games

Examples

1
2
3
my_games <- all_game_data(amateuR::kreisliga_goettingen)
estimate <- estimate_params(data = my_games, alpha = 0.9)
prediction(data = my_games, estimate = estimate, teamname = "RSV Göttingen 05", method = "all")

Niklas191/amateuR documentation built on Oct. 30, 2019, 10:14 p.m.