vMask.method2: Method 2 for V-Mask Implementation: Using mu0, d and h

Description Usage Arguments Value See Also Examples

View source: R/vMask.method2.R

Description

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 h.

Usage

1
vMask.method2(data, mu0 = mean(data), d, h = 5 * sd(data), sleep = 1)

Arguments

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 mean(data).

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.

h

The vertical distance between the origin and the upper (or lower) arm of V-mask.

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 sleep="PressEnter", then the user must press key [Enter] in 'R Console' window to continue/check the next cumulative summation point on chart with V-mask.

Value

theta

half of the angle formed by the V-mask arms (in degrees).

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.

See Also

vMask.method1

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
### Example 1:
m = 15	#The size of samples
n = 4 	#The size of each subsample
set.seed(100)
Data = matrix(rnorm(m*n, 2,5), nrow=m)
head(Data)

vMask.method2( data=Data, d=1, h=1, s=0 )
( res <- vMask.method2( data=Data, mu0=2, d=2, h=2, sl=0) )
Data[res$Out,]	#Out of control subsamples


### Example 2:
vMask.method2( data=Data, d=1, h=1, s=0 )
vMask.method1( data=Data, d=1, theta=45, s=0 )  #Similar results

vMask documentation built on May 1, 2019, 10:21 p.m.