get_probabilities {bpcs}R Documentation

Get the empirical win/draw probabilities based on the ability/strength parameters. Instead of calculating from the probability formula given from the model we create a predictive posterior distribution for all pair combinations and calculate the posterior wins/loose/draw The function returns the mean value of win/loose/draw for the player i. To calculate for player j the probability is 1-p_i

Description

Get the empirical win/draw probabilities based on the ability/strength parameters. Instead of calculating from the probability formula given from the model we create a predictive posterior distribution for all pair combinations and calculate the posterior wins/loose/draw The function returns the mean value of win/loose/draw for the player i. To calculate for player j the probability is 1-p_i

Usage

get_probabilities(bpc_object, n = 1000)

Arguments

bpc_object

a bpc object

n

number of samples to draw from the posterior

Value

a list with data frame table with the respective probabilities and a matrix with the corresponding posterior

Examples


m<-bpc(data = tennis_agresti,
player0 = 'player0',
player1 = 'player1',
result_column = 'y',
model_type = 'bt',
solve_ties = 'none')
prob<-get_probabilities(m)
print(prob$Table)


[Package bpcs version 1.0.0 Index]