dcSample: DC Sample

View source: R/dixon-coles.R

dcSampleR Documentation

DC Sample

Description

Get a random single game result using DC method. repeated running should give a new value each time

Usage

dcSample(
  home,
  away,
  params = NULL,
  maxgoal = 10,
  scores = HockeyModel::scores,
  expected_mean = NULL,
  season_percent = NULL,
  as_result = TRUE
)

Arguments

home

home team

away

away team

params

The named list containing m, rho, beta, eta, and k. See updateDC for information on the params list

maxgoal

max number of goals per team

scores

optional, if not supplying m & rho, scores used to calculate them.

expected_mean

the mean lambda & mu, used only for regression

season_percent

the percent complete of the season, used for regression

as_result

Whether to give a score or just flatten it to result type (see scores for score result)

Value

a random Home & away goals & OT/SO status if needed

Examples

dcSample("Toronto Maple Leafs", "Montreal Canadiens")

pbulsink/HockeyModel documentation built on Dec. 16, 2024, 8:03 a.m.