The function creates an interactive reliability growth plot for an `rga` object. The plot includes cumulative failures over time, the model fit, and optional confidence bounds. Vertical lines indicate change points if breakpoints are specified in the rga object.
Usage
plotly_rga(
rga_obj,
showConf = TRUE,
showGrid = TRUE,
main = "Reliability Growth Plot",
xlab = "Cumulative Time",
ylab = "Cumulative Failures",
pointCol = "black",
fitCol = "black",
confCol = "black",
gridCol = "lightgray",
breakCol = "black"
)
Arguments
- rga_obj
An object of class 'rga'. This object is created using the `rga()` function from the `ReliaGrowR` package.
- showConf
Show the confidence bounds (TRUE) or not (FALSE).
- showGrid
Show grid (TRUE) or hide grid (FALSE).
- main
Main title.
- xlab
X-axis label.
- ylab
Y-axis label.
- pointCol
Color of the point values.
- fitCol
Color of the model fit.
- confCol
Color of the confidence bounds.
- gridCol
Color of the grid.
- breakCol
Color of the breakpoints.
Examples
library(ReliaGrowR)
times <- c(100, 200, 300, 400, 500)
failures <- c(1, 2, 1, 3, 2)
rga <- rga(times, failures)
plotly_rga(rga)
times <- c(100, 200, 300, 400, 500, 600, 700, 800, 900, 1000)
failures <- c(1, 2, 1, 1, 1, 2, 3, 1, 2, 4)
breakpoints <- 400
rga2 <- rga(times, failures, model_type = "Piecewise NHPP", breaks = breakpoints)
#> Warning: Breakpoint estimate(s) outdistanced to allow finite estimates and st.errs
plotly_rga(rga2, fitCol = "blue", confCol = "blue", breakCol = "red")