weibull_oc | R Documentation |
weibull_oc
computes OC curves for Weibull reliability tests
(probability of passing test as a function of true prob or shape & scale)
weibull_oc(accept, ss, duration, shape, scale = NULL, md, R_m = NULL, plot = T)
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 |
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. |
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.
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"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.