View source: R/weibull_to_rga.R
| weibull_to_rga | R Documentation |
Converts Weibull data (failure, suspension, and interval-censored times) into a format suitable for reliability growth analysis (RGA). The function handles exact failure times, right-censored suspensions, and interval-censored data. It approximates interval-censored failures by placing them at the midpoint of the interval. The output is a data frame with cumulative time and failure counts. This format can be used with RGA models such as Crow-AMSAA.
weibull_to_rga(
failures,
suspensions = NULL,
interval_starts = NULL,
interval_ends = NULL
)
failures |
A numeric vector of exact failure times. Each failure time indicates when an item failed during the observation period. |
suspensions |
A numeric vector of suspension (right-censored) times. A suspension indicates that the item was removed from observation at that time without failure. This parameter is optional and can be NULL if there are no suspensions. |
interval_starts |
A numeric vector of interval start times (lower bound of censoring).
This parameter is optional and can be NULL if there are no interval-censored data.
If provided, it must be the same length as |
interval_ends |
A numeric vector of interval end times (upper bound of censoring).
This parameter is optional and can be NULL if there are no interval-censored data.
If provided, it must be the same length as |
The data frame contains two columns:
CumulativeTime |
Cumulative time at each failure event. |
Failures |
Number of failures at each cumulative time point. |
The function approximates interval-censored failures by placing them at the midpoint of the interval.
failures <- c(100, 200, 200, 400)
suspensions <- c(250, 350, 450)
interval_starts <- c(150, 300)
interval_ends <- c(180, 320)
result <- weibull_to_rga(failures, suspensions, interval_starts, interval_ends)
print(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.