Description Usage Arguments Details Value See Also Examples
View source: R/vMask.method1.R
The V-mask method in vMask
Package, is considered on the basis of variety of situations/information by different functions.
One of these functions is vMask.method1
which can plot the V-mask based on μ_0, d and θ.
1 | vMask.method1(data, mu0 = mean(data), d, theta = 14, sleep = 1)
|
data |
Type of inputted data must be a matrix with dim=c(m,n), in which m is size of samples and n is size of each subsample. Meanwhile, data can be a numerical vector where its elements are sub-sample means. |
mu0 |
Target value for process mean, with default |
d |
Suppose that O is the latest cumulative sum point (which duty of the V-mask is checking this point), and also P is the junction points of V-mask arms. Now, h is the distance between two points O and P. |
theta |
half of the angle formed by the V-mask arms (in degrees). |
sleep |
Sleeping time (in second) of the program between showing figures. This time needs for see the result of checking i-th point on CUSUM control chart by V-mask. Also, if |
The origin point of the V-Mask is placed over/top of the latest cumulative summation point and past points are examined to see if any fall above or below the arms of the V-mask. As long as all the previous points lie between the sides of the V-mask, the process is in control. Otherwise (even if one point lies outside) the process is suspected of being out of control.
h |
the vertical distance between the origin and the upper (or lower) arm of V-mask. |
c |
A vector of the cumulative differences between statistic (mean) values and the mean target value; i.e. c=(c_1, ..., c_m) where c_i=∑_{j=1}^{i} (\bar{x}_j - μ_0) . |
OutControl |
The number of Out-of-control points in CUSUM chart. |
InControl |
The number of In-control points in CUSUM chart. |
vMask.method2
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ### Example 1: (Data matrix)
m = 10 #The size of samples
n = 3 #The size of each subsample
set.seed(123)
Data = matrix(rnorm(m*n, 1.5,3), nrow=m)
head(Data, 4)
vMask.method1( data=Data, d=4, theta=30, sleep="PressEnter")
vMask.method1( data=Data, d=4, theta=30, sleep=0) #Check with sleep=1
vMask.method1( data=Data, d=4.5, theta=30, sleep=0)
vMask.method1( data=Data, mu0=0, d=4.5, theta=45, sl=0)
### Example 2: (Vectoral data)
set.seed(123)
vMask.method1( data=rnorm(20, 1,2), mu0=0, d=8, theta=45, sl=0)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.