gam_result: Beta Regression Prediction Function

Description Usage Arguments Examples

View source: R/log_score_functions.R

Description

This function will produce a prediction of the cumulative density function of a set of model predictions, if these are only available as aggregate percentiles

Usage

1
2
3
4
5
6
7
gam_result(
  p,
  x,
  gam_length = 30,
  bin_width = 1000,
  use_bin_width_parameter = F
)

Arguments

p

vector containing the percentile of the forecasts (i.e. the proportion of the forecasts at or below this level)

x

vector of levels of the outcome that is being forecasted (note x and probs must be same length, and not contain missing values)

gam_length

(Optional, default = 30) Number of desired bins OR provide bin_width

bin_width

(Optional, default = 1000) Desired bin width or provide gam_length

use_bin_width_parameter

(Optional, default=F), indicates whether to use bin width (rather than gam_length)

Examples

1
2
gam_result(myframe, p, cases, gam_length=50)
gam_result(myframe, p, deaths, bin_width=500, use_bin_width_parameter=T)

lmullany/forecastmetrics documentation built on Aug. 11, 2020, 12:33 a.m.