rocof: Nonparametric Estimate for the Rate of Occurrence of Failures...

View source: R/rocof.R

rocofR Documentation

Nonparametric Estimate for the Rate of Occurrence of Failures (ROCOF)

Description

rocof calculates the sample nonparametric estimate of the intensity function (i.e. rate of occurrence of failures (ROCOF), or failure rate) at time t. The inverse of this would be the sample nonparametric mean time between failure at time t. This function is useful for the creation of Duane Plots as shown in the examples section below.

Usage

rocof(t, by = NULL)

Arguments

t

A list of failure time vectors. Each vector should indicate a different system, i.e. if you have multiple systems each systems' failure times should be in it's own vector.

by

If providing a list of length > 1 this can be a vector that defines a name for each element of the list so as to return by system rocof and mtbf estimates.

Value

The output will be a data.frame containing, the 'by' variable (which specifies the system or process the failuresm are attributable to, if supplied in the list name), the failure times ("t"), and the corresponding nonparametric estimates for the instantaneous rocof and mtbf.

See Also

power_law_process, power_law_intensity, power_law_mcf, mcf, trend_test, ttt, common_beta

Examples

data(amsaa)

# Three systems failure times.
(df <- rocof(t = split(amsaa$Time, amsaa$System)))

ggplot(df,
  aes(
    x = t,
    y = rocof)) +
  scale_x_log10() +
  scale_y_log10() +
  geom_smooth(method='lm', se = FALSE) +
  geom_point() +
  labs(y = "Cumulative Failure Rate") +
  scale_colour_manual(values = cbPalette) +
  ggtitle("Duane Plot")

ggplot(df,
  aes(
    x = t,
    y = mtbf)) +
  scale_x_log10() +
  scale_y_log10() +
  geom_smooth(method='lm', se = FALSE) +
  geom_point() +
  labs(y = "Cumulative MTBF") +
  scale_colour_manual(values = cbPalette) +
  ggtitle("Duane Plot")

 rm(list = c("amsaa", "df"))


jjw3952/mcotear documentation built on Sept. 2, 2023, 10:30 a.m.