plot_predictions: Plotting the Dixon Coles prediction with a confidence...

Description Usage Arguments Details Examples

View source: R/prediction_plots.R

Description

This function allows the user to plot the Dixon Coles estimate in a 2d diagram for a given team. Use the optional argument method to return all or just future matches.

Usage

1
plot_predictions(game_data, estimate, team_name, method = "future")

Arguments

game_data

Output of all_game_data with parameter team = NA

estimate

Output of estimate_params using the same data

team_name

Home team name as a string

method

method = "futureH" returns all predictions for future home matches
method = "futureHA" returns all predictions for future home and away matchs
method = "allH" returns all predictions for past and future home matches

Details

Red point The final full time score for a past match
Black circle The point estimate
Black box Confidence interval as generated in estimate_params

Examples

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

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