| predict_nhpp | R Documentation |
Takes a fitted nhpp object and a vector of future cumulative times,
returning predicted cumulative events with confidence bounds.
predict_nhpp(object, time, conf_level = 0.95)
object |
An object of class |
time |
A numeric vector of cumulative times at which to forecast. All values must be finite and > 0. |
conf_level |
Confidence level (default 0.95). |
An object of class nhpp_predict containing:
time |
Forecast times. |
cum_events |
Predicted cumulative events. |
lower_bounds |
Lower confidence bounds. |
upper_bounds |
Upper confidence bounds. |
conf_level |
Confidence level used. |
model_type |
Model type. |
nhpp_object |
The original nhpp object. |
Other Repairable Systems Analysis:
exposure(),
mcf(),
nhpp(),
overlay_nhpp(),
plot.exposure(),
plot.mcf(),
plot.nhpp(),
plot.nhpp_predict(),
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))
print(fc)
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.