plot.duane_predict: Plot Method for duane_predict Objects

View source: R/duane.R

plot.duane_predictR Documentation

Plot Method for duane_predict Objects

Description

Plots observed MTBF, fitted Duane curve, and forecast with optional confidence bounds for a duane_predict object.

Usage

## S3 method for class 'duane_predict'
plot(x, conf_bounds = TRUE, legend = TRUE, legend_pos = "topleft", ...)

Arguments

x

An object of class duane_predict.

conf_bounds

Logical; include confidence bounds (default: TRUE).

legend

Logical; show the legend (default: TRUE).

legend_pos

Position of the legend (default: "topleft").

...

Additional arguments passed to plot().

Value

Invisibly returns NULL.

See Also

Other Duane functions: duane(), plot.duane(), predict_duane(), print.duane(), print.duane_predict()

Examples

times <- c(100, 200, 300, 400, 500)
failures <- c(1, 2, 1, 3, 2)
fit <- duane(times, failures)
fc <- predict_duane(fit, times = c(1000, 2000))
plot(fc, main = "Duane Forecast", xlab = "Cumulative Time", ylab = "MTBF")

ReliaGrowR documentation built on May 22, 2026, 5:07 p.m.