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

Description Usage Arguments Value Examples

View source: R/odds.fv.R

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)

marcoblume/odds.converter documentation built on May 21, 2019, 11:43 a.m.