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 calls zipf_race, and uses many races to handicap the winner of a single race. See the Handicapping using zipf_race vignette for a detailed explanation of the use of Zipfs Law, and also Handicapping using zipf_hcp to see zipf_hcp in use.
zipf_hcp(race, past_races, race_id, btn_var, rating = NULL, results = "detail", .progress = "none")
param | details |
---|---|
race | dataframe of a race to handicap |
past_races | dataframe of past races to be used to handicap race |
race_id | name of variable to split past_races up by so each split is one race |
btn_var | name of variable in race that contains the margins (in lbs) between the horses |
rating | name of ratings variable (if applicable) in race_2 |
results | default “detail”, determines the output, other option is “simple”, which will return the mean rating of all possible ratings |
.progress | plyr’s progress bar, default is “none”, options inc. “text”, “time”, “tk” or “win” |
The past_races dataframe is split according to race_id, so each split should be a small dataframe of a single race. For each of these single race dataframes, they are used as the race_2 parameter in zipf_race, while the race being handicapped is used as the race parameter.
If simple is entered into the results parameter then a single rating, the mean of all possible ratings, is returned. If the default of detail is left, then a list is returned containing:
An article by Simon Rowlands explaining his use of Zipfs Law and race standardisation can be found here