Description Usage Arguments Value Examples
View source: R/bpc_get_probabilities.R
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
1 | get_probabilities(bpc_object, n = 1000)
|
bpc_object |
a bpc object |
n |
number of samples to draw from the posterior |
a list with data frame table with the respective probabilities and a matrix with the corresponding posterior
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.