weibull_oc: Weibull Operating Characteristic (OC) Curves

View source: R/weibull_oc.R

weibull_ocR Documentation

Weibull Operating Characteristic (OC) Curves

Description

weibull_oc computes OC curves for Weibull reliability tests (probability of passing test as a function of true prob or shape & scale)

Usage

weibull_oc(accept, ss, duration, shape, scale = NULL, md, R_m = NULL, plot = T)

Arguments

accept

The allowable number of failures.

duration

The test duration.

shape

The Weibull shape parameter.

scale

The Weibull scale parameter (could be left as NULL if R_m is supplied). This is NULL by default.

md

The required mission duration for the reliability requirement.

R_m

The reliability requirement for the given mission duration.

s

The number of test units.

Value

Returns a data.frame with the probability of passing the test of a given duration with an allowable number of failures, given the true MTBF and R_m.

Examples

shape <- 2
scale_vec <- seq(4000, 6000, by = 2000)
mtbf_vec <- weibull_mean(shape, scale_vec)
weibull_oc(accept = 1, ss = 32, duration = 1500, shape = shape,
  scale = scale_vec, md = 2000, R_m = NULL, plot = F)

weibull_oc(accept = 1, ss = 32, duration = 1500, shape = shape,
  scale = NULL, md = 2000, R_m = c(.7788008, 0.8948393), plot = F)


scale_vec <- seq(4000, 30000, by = 50)
scale <- weibull_scale(2000, R_m = .8, shape = shape)
mtbf <- weibull_mean(shape, scale)
p1 <- weibull_oc(accept = 1, ss = 32, duration = 1500, shape = shape,
  scale = scale_vec, md = 2000, R_m = NULL, plot = T)
p1$p + 
  scale_y_continuous(limits = c(0,1), breaks = seq(0,1,.2)) +
  scale_x_continuous(limits = c(mtbf,10000), breaks = seq(3000,10000,1000))

 rm(list = c("shape", "scale_vec", "mtbf_vec", "scale", "mtbf", "p1"))


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