| nhpp | R Documentation |
Fits a parametric NHPP model to recurrent event data from repairable systems. Supported models include the Power Law process and the Log-Linear process. The Power Law model can also be fit as a piecewise (segmented) model with automatic change point detection or user-specified breakpoints.
nhpp(
time,
event = NULL,
data = NULL,
model_type = "Power Law",
breaks = NULL,
method = c("MLE", "LS"),
conf_level = 0.95
)
time |
A numeric vector of cumulative event times, or a data frame
containing columns |
event |
An optional numeric vector of event counts at each time. If
|
data |
An optional data frame containing columns |
model_type |
Model type: |
breaks |
Optional vector of breakpoints for piecewise Power Law model. |
method |
Estimation method: |
conf_level |
Confidence level for bounds (default 0.95). |
The Power Law NHPP models the cumulative number of events as
N(t) = \lambda t^\beta. The parameter
\beta > 1 indicates a deteriorating system (increasing event rate),
\beta < 1 an improving system, and \beta = 1 a constant rate
(HPP).
The Log-Linear NHPP models the intensity as
\lambda(t) = \exp(a + bt) with cumulative
function \Lambda(t) = \frac{e^a}{b}(e^{bt} - 1).
An object of class nhpp containing:
time |
The input cumulative event times. |
event |
The event counts. |
cum_events |
Cumulative event counts. |
n_obs |
Number of observations. |
model |
Fitted model object (lm or segmented), or NULL for MLE. |
model_type |
|
method |
|
params |
Named list of estimated parameters. |
params_se |
Named list of standard errors. |
vcov |
Variance-covariance matrix (MLE only). |
fitted_values |
Fitted cumulative events. |
lower_bounds |
Lower confidence bounds. |
upper_bounds |
Upper confidence bounds. |
residuals |
Model residuals. |
logLik |
Log-likelihood. |
AIC |
Akaike Information Criterion. |
BIC |
Bayesian Information Criterion. |
breakpoints |
Breakpoints (log scale) if piecewise model. |
conf_level |
Confidence level used. |
Other Repairable Systems Analysis:
exposure(),
mcf(),
overlay_nhpp(),
plot.exposure(),
plot.mcf(),
plot.nhpp(),
plot.nhpp_predict(),
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)
result <- nhpp(time, event)
print(result)
plot(result, main = "Power Law NHPP")
result_ll <- nhpp(time, event, model_type = "Log-Linear")
print(result_ll)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.