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 |
string denoting chart type. |
testType |
A vector or a scalar of test codes to be performed. Eight tests are implemented corrensponding to codes 1-8. Default performed test is 1. test 1: test 2: test 3: test 4: test 5: test 6: test 7: test 8: |
k |
Parameter specific for the test. It is compulsory to be specified as a vector of length equal to length(testType). See details |
p |
Parameter specific for the test. it is compulsory to be specified as a vector of length equal to length(testType). See details |
nSigma |
standard deviation of confidence line, required in some test. |
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.
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