hth_lmer: Assess Head-to-Head Performance Using lmer Model

Description Usage Arguments

View source: R/head_to_head_lmer.R

Description

Fit an 'lmer()' model to prior head-to-head results for a set of skiers in order to plot expected vs observed performances. This is attempting to serve the same general purpose as 'head_to_head_race()' but using a more "sophisticated" method.

Usage

1
2
3
hth_lmer(ath_names, race_id, num_opp = Inf, cutoff = 365 * 5,
  min_encounters = 1, measure = c("rank", "fispoints", "pb"),
  events = c("all", "maj_int"), restrict_by = NULL, race_title = "")

Arguments

ath_names

character vector of athlete names

race_id

integer; id of the race to assess performance of

num_opp

integer; number of opponents to consider in each race, if 'Inf' use all opponents

cutoff

integer; size of time window in days to collect prior races from

min_encounters

integer; only include opponents who have faced an athlete at least this many times

measure

character; one of "rank", "fispints" or "pb" (percent back)

restrict_by

currently unused

race_title

character; race title to add to the plot


joranE/statskier2 documentation built on May 19, 2019, 8:42 p.m.