plot.idr: Plot IDR predictions

Description Usage Arguments Value See Also Examples

View source: R/evaluation.R

Description

Plot an IDR predictive CDF.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## S3 method for class 'idr'
plot(
  x,
  index = 1,
  bounds = TRUE,
  col.cdf = "black",
  col.bounds = "blue",
  lty.cdf = 1,
  lty.bounds = 3,
  xlab = "Threshold",
  ylab = "CDF",
  main = "IDR predictive CDF",
  ...
)

Arguments

x

object of class idr (output of predict.idrfit).

index

index of the prediction in x for which a plot is desired.

bounds

whether the bounds should be plotted or not (see predict.idrfit for details about the meaning of the bounds).

col.cdf

color of the predictive CDF.

col.bounds

color of the bounds.

lty.cdf

linetype of the predictive CDF.

lty.bounds

linetype of the CDF bounds.

xlab

label for x axis.

ylab

label for y axis.

main

main title.

...

further arguments to plot.stepfun or plot.

Value

The data based on which the plot is drawn (returned invisible).

See Also

predict.idrfit

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
data("rain")
require("graphics")

## Postprocess HRES and CTR forecast using data of 2 years

X <- rain[1:(2 * 365), c("HRES", "CTR"), drop = FALSE]
y <- rain[1:(2 * 365), "obs"]

## Fit IDR and plot the predictive CDF when the HRES forecast is 1 mm and
## CTR is 0 mm

fit <- idr(y = y, X = X)
pred <- predict(fit, data = data.frame(HRES = 1, CTR = 0))
plot(pred)

isodistrreg documentation built on March 22, 2021, 5:06 p.m.