get_probabilities: Get the empirical win/draw probabilities based on the...

Description Usage Arguments Value Examples

View source: R/bpc_get_probabilities.R

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

1
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

1
2
3
4
5
6
7
8
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)

bpcs documentation built on Dec. 15, 2020, 5:23 p.m.