model_pred_mat: Return pairwise predictions for specified agents

Description Usage Arguments Value Examples

View source: R/model_pred_mat.R

Description

Given a mELO_rating model and a vector of agents, this function gives the predicted success probabilities for each combination. This is useful for mELO models as the ratings alone is not useful for predicting outcomes.

Usage

1
model_pred_mat(model, agents, round = 4)

Arguments

model

An object of class mELO_rating.

agents

a vector of agents/players/teams you would like to pairwise predictions for.

round

Round results to how many figures. Default is 4.

actual_matrix

Should result be an actual matrix? Default is FALSE and the output is a data.frame.

Value

a data.frame.

Examples

1
2
3
4
5
6
7
8
9
# Fit a mELO model that can handle these types of interactions.
rps_mELO <- mELO(rps_df, k=1)
rps_mELO

# Get pairwise predictions
model_pred_mat(
   rps_mELO,
   unique(rps_df[[2]])
)

dclaz/mELO documentation built on May 17, 2021, 2:27 a.m.