This function is used to calculate the two-sided control limit for EWMA-p charts with the correction of measurement error effects.
If two truly classified probabilities pi1
and pi2
are given by 1, then the corresponding control limit is free of measurement error.
EWMA_p_two(p, lambda, n, pi1 = 1, pi2 = pi1, ARL0 = 200, M = 500, error = 10)
The proportion of defectives in the in-control process.
An EWMA smooth constant, which is a scalar in [0,1].
A sample size in the data.
The proportion that the observed defectives are the same as unobserved ones.
The proportion that the observed non-defectives are the same as unobserved ones.
A prespecified average run length (ARL) of a control chart in the in-control process.
The number of simulation times for the Monte Carlo method
The tolerant for the absolute different between an itevated ARL calue and prespecified ARL0
.
L1
\(\hspace{2.2cm}\) The coefficient of the upper control limit.
L2
\(\hspace{2.2cm}\) The coefficient of the lower control limit.
hat_ARL0
\(\hspace{1.1cm}\) The estimated in-control average run length based on given L1
and L2
.
hat_MRL0
\(\hspace{1.1cm}\) The estimated in-control median of run length based on given L1
and L2
.
hat_SDRL0
\(\hspace{0.9cm}\) The estimated in-control standard deviation of run length based on given L1
and L2
.
UCL
\(\hspace{2cm}\) The limiting value of the upper control limit with L1
.
LCL
\(\hspace{2cm}\) The limiting value of the lower control limit with L2
.
Chen, L. P., & Yang, S. F. (2022). A New \(p\)-Control Chart with Measurement Error Correction. arXiv preprint arXiv:2203.03384.
# NOT RUN {
set.seed(2)
EWMA_p_two(0.2,0.05,5,1,1,200,100,20)
# }
Run the code above in your browser using DataLab