testFun {qAnalyst} | R Documentation |
testFun
executes control charts test.
testFun(x, sg, type, testType, k, p, nSigma)
x |
input data vector. |
sg |
subgroups id, vector or integer. |
type |
character element for the type of chart. |
testType |
a vector (eventually a scalar) containing the code of the desidered tests to be performed. |
k |
k is a parameter specific for the test. It is compulsory to be specified as a vector of length equal to length(testType). |
p |
p is a parameter specific for the test. it is compulsory to be specified as a vector of length equal to length(testType). |
nSigma |
standard deviation of confidence line, required in some test. |
This items lists the descriptions of the performed tests itemize {
If the parameter vectors have zero elements, they are converted into default values for the test. To avoid confusion on parameters assignment the length of parameter vectors shall be equal. Some checks on the internal coerence of the given parameters are performed.
A binary vector whose dimension is equal to the points plotted on the control chart is returned. A value of 1 means that the i-th point failed the performed test, a value of 0 means that the i-th points did not failed the performed test.
This function is for internal use.
Giorgio Spedicato and Andrea Spano'.
Montgomery, Statistical Quality Control.
#example of test 3 x=c(1,0,3,2,3,5,6,8,7,6) sg=2 #i chart used for simplicity outTest=testFun(x=x,type="i",sg=sg, testType=3,k=4,p=4,nSigma=3) print(outTest) # 0 0 0 0 0 0 1 1 0 0 ok