Learn R Programming

isodistrreg (version 0.6.0)

plot.idr: Plot IDR predictions

Description

Plot an IDR predictive CDF.

Usage

# S3 method for idr
plot(
  x,
  index = 1,
  col.cdf = "black",
  lty.cdf = 1,
  xlab = "Threshold",
  ylab = "CDF",
  main = "IDR predictive CDF",
  ...
)

Value

The plotted CDF values (returned invisible).

Arguments

x

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

index

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

col.cdf

color of the predictive CDF.

lty.cdf

linetype of the predictive CDF.

xlab

label for x axis.

ylab

label for y axis.

main

main title.

...

further arguments to plot.stepfun or plot.

See Also

predict.idrfit

Examples

Run this code
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)

Run the code above in your browser using DataLab