Skip to contents

This function takes the relevant outcome probabilities for a match and calculates its projected result based upon the outcome of a random number generator.

Usage

calc_points_simulated_match(
  data_model_parameters_unplayed_slim,
  randoms,
  number_sims,
  value_match
)

Arguments

data_model_parameters_unplayed_slim

These are the model parameters assigned to unplayed matches in this Premier League season, as generated by model_parameters_unplayed, with appropriate columns retained.

randoms

This is a vector of uniformly-distributed random numbers, with a length of the product of the number of remaining matches and the number of simulations.

number_sims

This is the number of simulations to use for each game in the remaining season. Defaults to 50,000.

value_match

This is the simulated match to choose within the randoms vector of many simulated matches.

Examples

if (FALSE) { # \dontrun{
calc_points_simulated_match(
  data_model_parameters_unplayed_slim = data_model_parameters_unplayed,
  randoms = data_randoms,
  number_sims = value_number_sims,
  value_match = 1L
  )
} # }