pinball: Pinball Score for 'MultiQR' Objects

View source: R/pinball.R

pinballR Documentation

Pinball Score for MultiQR Objects

Description

This function calculates the pinball score for each quantile in a MultiQR object. Optionally, results are produced by cross-validation fold or covariate, 95% confidence intervals are estimated via bootstrap, and results are plotted.

Usage

pinball(
  qrdata,
  realisations,
  kfolds = NULL,
  subsets = NULL,
  breaks = 4,
  bootstrap = NULL,
  plot.it = T,
  ...
)

Arguments

qrdata

MultiQR object.

realisations

Vector of realisations corresponding to rows of qrdata. NA accepted where realisations are missing.

kfolds

Optional vector of fold/test labels corresponding to rows of qrdata. Cannot be used with subsets.

subsets

Optional vector of covariates to bin data by. Breaks between bins are the empirical quantiles of subsets by default or all unique factors or charater strings. Custom breaks may be specifed, see breaks. Cannot be used with kfolds.

breaks

Either the number of quantiles to use to bin subsets by (resulting in breaks+1 bins, defaults to breaks=4), or, if length(breaks) > 1, a vector of spcific break points. Only used if subsets provided.

bootstrap

Number of boostrap samples used to generate 95% confidence intervals.

plot.it

boolean. Make a plot?

...

Additional arguments passed to plot().

Details

Missing values in realisations are handled by na.rm=T when calculating average exceedence of a given quantile.

Value

Quantile Score data and, if plot.it=T, a plot.

Author(s)

Jethro Browell, jethro.browell@strath.ac.uk


jbrowell/ProbCast documentation built on July 20, 2024, 1:53 p.m.