predict_winner: Predict the winner of a series of matches

Description Usage Arguments Value

View source: R/bradley_terry.R

Description

Finds the probability of player1 winning in each match, using the predicted Bradley-Terry scores.

Usage

1
predict_winner(test_dat,lambda_hat,players)

Arguments

test_dat

a matrix containing the matches played.

lambda_hat

vector contain a list of all the predicted scores from the EM algorithm.

players

vector containing a list of players for which there is a predicted Bradley-Terry score.

Value

The probability that player 1 beats player 2 using the Bradley-Terry formula: lambda_1/(lambda_1+lambda_2). If either of the player does not have a predicted score then 0.5 is returned to express uncertainty.


ss15859/tennis.wta documentation built on Jan. 24, 2021, 12:46 a.m.