Learn R Programming

EATME (version 0.1.0)

cont_to_disc_V: Convert data to V statistic

Description

Convert continuous random variables in in-control process to discrete data with V statistic, where V statistic is the total number of sample satisfying \(Y_{ij}=\frac{(X_{i2j}-X_{i(2j-1)})^2}{2}>\sigma^2\) at time \(i\), where \(X_{ij}\) is the observation for the \(i^{th}\) sampling period and the \(j^{th}\) sample in the in-control data, \(n\) is the number of the sample size and \(m\) is the number of the sampling periods. \(\sigma^2\) is population variance of continuous in-control data. If \(\sigma^2\) is unknown, it can be estimated by \(\hat{\sigma}^2 = \frac{\sum^m_{i=1}S_i^2}{m}\) and \(S_i^2 = \frac{\sum^n_{j=1}(X_{ij}-\overline{X}_i)^2}{n-1}\).

Usage

cont_to_disc_V(ICdata, OCdata, var.p = NULL)

Arguments

ICdata

The in-control data.

OCdata

The out-of-control data.

var.p

Variance of the random variables in the in-control data.

Value

V0\(\hspace{2cm}\) The V statistic for in-control data.

V1\(\hspace{2cm}\) The V statistic for out-of-control data.

p0\(\hspace{2cm}\) The process proportion for in-control data.

p1\(\hspace{2cm}\) The process proportion for out-of-control data.

n\(\hspace{2.2cm}\) The number of the sample size.

References

Yang, S. F. & Arnold, B. C. (2014). A simple approach for monitoring business service time variation.The Scientific World Journal, 2014:16.

Yang, S. F., & Arnold, B. C. (2016). A new approach for monitoring process variance. Journal of Statistical Computation and Simulation, 86(14), 2749-2765.

Examples

Run this code
# NOT RUN {
IC = matrix(rnorm(100,0,1),ncol = 10,byrow = TRUE)
OC = matrix(rnorm(100,0,2),ncol = 10,byrow = TRUE)
cont_to_disc_V(IC,OC)
# }

Run the code above in your browser using DataLab