model_fight_outcome.RdPredicts the probability of a win and method of victory for a matchup between two fighters. It supports three statistical frameworks: a multinomial logistic regression, a Bradley-Terry (Logit) network model, and a Thurstone-Mosteller (Probit) network model.
model_fight_outcome(
fighter1,
fighter2,
method_type = "multinomial",
fights_data = ufc_fights,
athletes_data = ufc_athletes,
predictors = NULL,
plot_chart = TRUE
)A character string of length 1 naming the first athlete.
A character string of length 1 naming the second athlete.
A character string specifying the model type. Options are: `"multinomial"`, `"bradley-terry"`, or `"thurstone-mosteller"`. Default is `"multinomial"`.
A data frame containing historical fight records. Default is `ufc_fights`.
A data frame containing athlete statistics. Default is `ufc_athletes`.
A character vector of variables to use in the model formula. If `NULL`, a robust default set is used based on the `method_type`.
A logical indicating whether to draw the probability chart. Defaults to `TRUE`.
Returns an object of class fight_prediction containing:
The fitted model object (`multinom` or `BTm`).
A data frame of predicted probabilities for each fighter and method of victory.
The generated ggplot2 object (if ggplot2 is available).
if (FALSE) { # \dontrun{
# Standard Execution
model_fight_outcome("Islam Makhachev", "Alexander Volkanovski", method_type = "multinomial")
# Assigned to a Variable (Hidden Output, can be printed later)
my_model <- model_fight_outcome(
"Max Holloway", "Justin Gaethje",
method_type = "multinomial",
plot_chart = FALSE
)
print(my_model)
} # }