duane_plot: Plotting Function for Duane Analysis.

View source: R/duane_plot.R

duane_plotR Documentation

Plotting Function for Duane Analysis.

Description

Plotting Function for Duane Analysis.

Usage

duane_plot(
  times,
  failures,
  plot = TRUE,
  point_col = "black",
  line_col = "black",
  xlab = "Cumulative Time",
  ylab = "Cumulative MTBF",
  main = "Duane Plot with Cumulative MTBF"
)

Arguments

times

A vector of cumulative times at which failures occurred.

failures

A vector of the number of failures at each corresponding time in times.

plot

Show Duane Plot (TRUE) or hide plot (FALSE).

point_col

Color for the data points (default: "black").

line_col

Color for the fitted line (default: "black").

xlab

Label for the x-axis (default: "Cumulative Time").

ylab

Label for the y-axis (default: "Cumulative MTBF").

main

Title for the plot (default: "Duane Plot with Cumulative MTBF").

Value

The function returns a list of the fitted linear model, Cumulative Time, Cumulative MTBF.

Examples

library(ReliaGrowR)
times <- c(100, 200, 300, 400, 500)
failures <- c(1, 2, 1, 3, 2)
fit <- duane_plot(times, failures)
summary(fit)

ReliaGrowR documentation built on April 4, 2025, 1:06 a.m.