| plot.nhpp_predict | R Documentation |
Plots observed data, fitted model, and forecast with optional confidence bounds.
## S3 method for class 'nhpp_predict'
plot(x, conf_bounds = TRUE, legend = TRUE, legend_pos = "topleft", ...)
x |
An object of class |
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 |
Invisibly returns NULL.
Other Repairable Systems Analysis:
exposure(),
mcf(),
nhpp(),
overlay_nhpp(),
plot.exposure(),
plot.mcf(),
plot.nhpp(),
predict_nhpp(),
print.exposure(),
print.mcf(),
print.nhpp(),
print.nhpp_predict()
time <- c(200, 400, 600, 800, 1000)
event <- c(3, 5, 4, 7, 6)
fit <- nhpp(time, event)
fc <- predict_nhpp(fit, time = c(1500, 2000))
plot(fc, main = "NHPP Forecast", xlab = "Time", ylab = "Cumulative Events")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.