murphydiag: Murphy diagram object

Description Usage Arguments Details Value See Also

View source: R/murphydiag.R

Description

Documentation of the 'murphydiag' object, and its constructors.

Usage

1
2
3
4
murphydiag(..., y = NULL, type = NULL, level = NULL, m = NULL,
  newdata = NULL)

murphydiag0(y, type, level = NULL)

Arguments

...

objects to be coerced to 'murphydiag' and concatenated

y

a numeric vector of response values to be predicted.

type

a string specifying the type of forecast; one of "prob", "mean", "expectile", "median", "quantile".

level

a single numeric value for the level of the "quantile" or "expectile" functional.

m

an object inheriting from the class 'murphydiag'; alternative to y, type, level.

newdata

an optional data frame used as environment in which to evaluate predict methods of model objects.

Details

murphydiag constructs and returns an object inheriting from the class 'murphydiag'. It is a wrapper function around the concatenation function described in c.murphydiag, which in turn calls the underlying coercion methods described in as.murphydiag.

murphydiag0 constructs an empty 'murphydiag' object from response values and the type of predictions that are expected.

Numeric predictions are ideally come with additional meta information about their type. Objects of the class 'murphydiag' can be constructed from probability predictions for binary outcomes (type = "prob"), from mean predictions for real-valued outcomes (type = "mean"), or from median predictions (type = "median"). As a generalization of median predictions, quantile predictions at level α (e.g., type = "quantile" and level = 0.5) are also implemented. In the same way as a quantile is a generalization of the median, we can generalize mean predictions by expectile predictions at level α (e.g., type = "expectile" and level = 0.5).

When evaluating the quality of predictions, the prediction meta information influences the set of admissible scoring functions. The elementary scoring functions used in this package are as follows:

Value

murphydiag returns a 'murphydiag' object, which is a named list-type vector class with attributes

y a numeric vector of response values to be predicted.
functional a list containing the specified type of forecast, and level if applicable.

Each entry of a 'murphydiag' object is a list with the following components:

x a numeric vector of predictions for y.
knots a numeric vector of knots of the piecewise linear Murphy diagram.
values a list containing numeric vectors of the left and right sided limits of the Murphy diagram values taken in the knots (left and right), and the maximal value (max).

murphydiag0 returns an empty 'murphydiag' object with attributes y and functional.

See Also

c.murphydiag, [.murphydiag, plot.murphydiag.


aijordan/murphydiagram2 documentation built on Jan. 1, 2020, 3:08 p.m.