odds.fv: Calculate the fair (vigorish free) odds for a vector of...

Description Usage Arguments Value Examples

Description

Calculate the fair (vigorish free) odds for a vector of vigged odds.

Usage

1
2
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

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

Example output

    X.120      X110 
-114.5455  114.5455 
    X2.05     X3.12      X2.9 
0.4230212 0.2779466 0.2990322 
          Home      Away
[1,] 0.6590909 0.3409091
[2,] 0.5500000 0.4500000
[3,] 0.5189873 0.4810127
       df.Home   df.Away
[1,] 0.6590909 0.3409091
[2,] 0.5500000 0.4500000
[3,] 0.5189873 0.4810127
[1] 0.6590909 0.5500000 0.5189873

odds.converter documentation built on May 1, 2019, 8:02 p.m.