RcappeR

Assess the performance (ie. handicap) of a winner of a race using race standardisation; which uses the performances of runners in a different, but similar, race. This function is called by both zipf_hcp and zipf_init, see the Handicapping using zipf_race vignette for a detailed explanation.

Usage

zipf_race(race, btn_var, race_2, rating)

Arguments

param details
race dataframe of a race to handicap
btn_var name of variable in race that contains the margins (in lbs) between the horses
race_2 dataframe of a second race, that is to be used to handicap race
rating name of ratings variable (if applicable) in race_2

Details

The method of race standardisation used was first explained by Simon Rowlands, of Timeform, and uses Zipfs Law. See the Handicapping using zipf_race vignette for a detailed explanation.

In short the difference at the weights (see diff_at_wgts) from race is added to the rating in race_2, creating a vector of possible ratings for the winner of race. This is where Zipfs Law plays its part, as these ratings are weighted according to the corresponding finishing position, placing more significance on the possible ratings using the horses toward the front of the field.

An article by Simon Rowlands explaining his use of Zipfs Law and race standardisation can be found here