predict_nhpp: Forecast Cumulative Events from an NHPP Model.

View source: R/nhpp.R

predict_nhppR Documentation

Forecast Cumulative Events from an NHPP Model.

Description

Takes a fitted nhpp object and a vector of future cumulative times, returning predicted cumulative events with confidence bounds.

Usage

predict_nhpp(object, time, conf_level = 0.95)

Arguments

object

An object of class nhpp returned by nhpp().

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).

Value

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.

See Also

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()

Examples

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")

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