qpred {isodistrreg} | R Documentation |
Quantile function of IDR or raw forecasts
Description
Evaluate the the quantile function of IDR predictions or of unprocessed
forecasts in a data.frame
.
Usage
qpred(predictions, quantiles)
## S3 method for class 'idr'
qpred(predictions, quantiles)
## S3 method for class 'data.frame'
qpred(predictions, quantiles)
Arguments
predictions |
either an object of class |
quantiles |
numeric vector of desired quantiles. |
Details
The quantiles are defined as lower quantiles, that is,
q(u) = inf(x: cdf(x) >= u).
Value
A matrix of forecasts for the desired quantiles, one column per quantile.
See Also
Examples
data("rain")
## Postprocess HRES forecast using data of 3 years
X <- rain[1:(3 * 365), "HRES", drop = FALSE]
y <- rain[1:(3 * 365), "obs"]
fit <- idr(y = y, X = X)
## Compute 95%-quantile forecast given that the HRES forecast is
## 2.5 mm, 5 mm or 10 mm
predictions <- predict(fit, data = data.frame(HRES = c(2.5, 5, 10)))
qpred(predictions, quantiles = 0.95)
[Package isodistrreg version 0.1.0 Index]