predict_expg: Predict Methods for goalmodel Fits

View source: R/goalmodel_predict.R

predict_expgR Documentation

Predict Methods for goalmodel Fits

Description

Make predictions using a fitted goalmodel.

Usage

predict_expg(model_fit, team1, team2, x1 = NULL, x2 = NULL, return_df = FALSE)

predict_goals(
  model_fit,
  team1,
  team2,
  x1 = NULL,
  x2 = NULL,
  return_df = FALSE,
  maxgoal = NULL,
  lwrx = NULL
)

predict_result(
  model_fit,
  team1,
  team2,
  x1 = NULL,
  x2 = NULL,
  return_df = FALSE
)

predict_ou(
  model_fit,
  team1,
  team2,
  x1 = NULL,
  x2 = NULL,
  ou = 2.5,
  return_df = FALSE
)

predict_btts(model_fit, team1, team2, x1 = NULL, x2 = NULL, return_df = FALSE)

Arguments

model_fit

A goalmodel object.

team1

A character vector with team names, for which to make predictions of.

team2

A character vector with team names, for which to make predictions of.

x1

Additional covariates to be used for making predictions.

x2

Additional covariates to be used for making predictions.

return_df

Whether a data.frame should be returned.

maxgoal

Numeric, the upper limit of how many goals to make predictions for. If not set, a reasonable upper limit will be found based on the data used to fit the model.

lwrx

Numeric. The lowest upper limit for the number of goals to compute probabilities for, if maxgoal is not given.

ou

Numeric, defining the over/under. Default is 2.5.

Details

These functions predict expected goals, the probabilities for individual scorelines, 1x2 results, both teams to score, and total over/under probabilities.


opisthokonta/goalmodel documentation built on April 3, 2024, 1:32 a.m.