repGBprior.plan: Determine the design of a censored repetitive sampling plan...

Description Usage Arguments Value Examples

View source: R/repGBprior.plan.R

Description

This function computes the design of the censored repetitive sampling plan using a model prior of p and expected sampling risks given the requirements of the producer and consumer about maximum allowable risks and quality levels

Usage

1
repGBprior.plan(risks, p, asvar, beta.pars, pg_bar = TRUE)

Arguments

risks

Vector of producer and consumer maximum sampling risks

p

Vector of acceptance and rejection quality levels

asvar

List with the asymptotical variance-covariance matrix of MLE estimators of location and scale lifetime distribution parameters. See asympt.var() for more details.

beta.pars

Data frame with the GB parameters according to the available knowledge about p. See beta.params() for more details.

Value

A data.frame with the following variables of the censored repetitive design of the sampling plans.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
risks<-c(0.05,0.10)
p<-c(0.00654, 0.0426)
q<- 0.1
asvar<-asympt.var(q,"normal")
l<- p[1]/5
u<- p[2]+(p[1]-l)

# GB parameters for a knowledge of mean and variance of p distribution
know_p<-list(mean_p=p[1],var_p=((p[2]-p[1])/4)^2)
beta.parms<-beta.params(p,l,u, know_p)

designs<-repGBprior.plan(risks,p,asvar, beta.parms)

optimal.design<-designs %>% group_by(q,dist,p_alpha,p_beta) %>%
                filter( (abs(alpha-risks[1])<1e-05) & (abs(risks[2]-beta)<1e-05) & (termcd==1)) %>%
                group_by(q,p_alpha,p_beta,a,b,l,u,dist) %>%
                mutate(easn_min=min(easn)) %>%
                slice(which.min(easn)) %>% as.data.frame()

ULL-STAT/RepetPlan documentation built on Dec. 18, 2021, 5:15 p.m.