Description Usage Arguments Details Value See Also Examples
Evaluate the the cumulative distribution function (CDF) of IDR predictions or
of unprocessed forecasts in a data.frame
.
1 2 3 4 5 6 7 |
predictions |
either an object of class |
thresholds |
numeric vector of thresholds at which the CDF will be evaluated. |
The CDFs are considered as piecewise constant stepfunctions: If x
are
the points where the IDR fitted CDF (or the empirical distribution of the
forecasts) has jumps and p
the corresponding CDF values, then for
x[i] <= x < x[i + 1]
, the CDF at x
is p[i]
.
A matrix of probabilities giving the evaluated CDFs at the given thresholds, one column for each threshold.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | 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 probability of precipitation given that the HRES forecast is
## 0 mm, 0.5 mm or 1 mm
predictions <- predict(fit, data = data.frame(HRES = c(0, 0.5, 1)))
1 - cdf(predictions, thresholds = 0)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.