odds.fv {odds.converter} | R Documentation |
Calculate the fair (vigorish free) odds for a vector of vigged odds.
Description
Calculate the fair (vigorish free) odds for a vector of vigged odds.
Usage
odds.fv(..., input = "us", output = "us",
Vectorized2wayOutput1stElement = FALSE)
Arguments
... |
Odds of the format defined in input, the odds can be submitted as a data.frame or as a vector |
input |
Default to US Odds. Valid selections are "us" for US odds, "prob" for Probability ,"dec" for Decimal odds,"malay" for Malaysian odds, "hk" for Hong Kong odds, "indo" for Indonesian odds |
output |
Default to US Odds. Valid selections are "us" for US odds, "prob" for Probability ,"dec" for Decimal odds,"malay" for Malaysian odds, "hk" for Hong Kong odds, "indo" for Indonesian odds |
Vectorized2wayOutput1stElement |
This speeds up the calculation as the output is a a vector that contains the FV of the first input. Usefull in dplyr chains. |
Value
A vector or a matrix of the fair values of the the given vigged values in the format chosen in output
Examples
odds.fv(-120,110)
odds.fv(2.05,3.12,2.90,input="dec",output="prob")
df <- data.frame(Home = c(1.5,1.8,1.9),
Away = c(2.9,2.2,2.05))
odds.fv(df,input = "dec",output = "prob")
odds.fv(df$Home,df$Away,input="dec",output="prob")
odds.fv(df$Home,df$Away,input="dec",output="prob",Vectorized2wayOutput1stElement = TRUE)