Learn R Programming

vMask (version 1.0)

vMask.method5: Method 5 for V-Mask Implementation: Using \(\mu0\), \(\mu1\), \(\sigma\), \(\alpha\) and \(\beta\)

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 \(\mu_0\), \(\mu_1\), \(\sigma\) and the probabilities of type I and II errors of testing null hypotheses \(H_0: \mu = \mu_0\) vs. alternative hypothesis \(H_1: \mu = \mu_0 + k \sigma\).

Usage

vMask.method5(data, mu0 = mean(data), mu1, sigma = sd(data), alpha, beta = 0.001,
 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

The target value for process mean, with default mean(data).

mu1

The mean under the alternative hypothesis, i.e., \(\mu_1 = \mu_0 + k \sigma\).

sigma

The standard deviation of the process, with default sd(data).

alpha

The probability of type I error in testing hypotheses \(H_0: \mu = \mu_0\) vs. \(H_1: \mu = \mu_0 + k \sigma\).

beta

The probability of type II error in testing hypotheses \(H_0: \mu = \mu_0\) vs. \(H_1: \mu = \mu_0 + k \sigma\). The default of beta is the very small probability value 0.001.

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

d

The distance between two points: (1) \(O\), i.e the latest cumulative sum point (which duty of the V-mask is checking this point), and (2) \(P\), i.e. the junction points of V-mask arms.

k

Difference/shift in the mean of process after a probably change. Its default is considered \(0.5 \sigma\) and it depends on the form of the alternative hypothesis \(H_1: \mu = \mu_1 \ (\mu_1=\mu_0+k \sigma)\).

theta

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

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=\sum_{j=1}^{i} (\bar{x}_j - \mu_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.method3, vMask.method6

Examples

Run this code
# NOT RUN {
m = 26	#The size of samples
n = 2 	#The size of each subsample
set.seed(2345)
Data = matrix(rnorm(m*n, 0,1), nrow=m)
head(Data)

vMask.method5( data=Data, mu0=0, mu1=1,  alpha=.1, beta=.01, sl=0 )
vMask.method5( data=Data, mu0=0, mu1=.5, alpha=.1, beta=.01, sl=0 )
# }

Run the code above in your browser using DataLab