spc {qAnalyst} | R Documentation |
spc
function creates spc class objects from data. Generic methods plot
, print
, summary
are avaiable for SPC class objects.
spc(x, sg, type = "xbar", name = deparse(substitute(x)), testType = 1, k = NA, p = NA, nSigma = NA)
x |
data vector |
sg |
Subgroup variable. This argument has a different meaning according to chart type.
|
type |
Chart type. String identifying chart type. Charts can be of type: "xbar", "r", "s", "i", "mr", "p", "np", "u", "c". |
name |
Name of x variable as it appears in the charts. By default the name of the given x variable |
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 |
A vector or a scalar of parameters to be used by tests. If k is not specified, tests are performed with k default values. If k is specified, its length must be of the same length as testType. |
p |
A vector or a scalar of parameters to be used by tests. If p is not specified, tests are performed with p default values. If p is specified, its length must be of the same length as testType. |
nSigma |
A vector or a scalar of parameters to be used by tests. If nSigma is not specified, tests are performed with nSigma default values. If nSigma is specified, its length must be of the same length as testType. |
spc
function performs coherence tests on subgroups dimension and chart name. Then it calculates graphical parameters, statistics values and test results and stores this values in lists.
An object of class spc
No notes
Andrea Spano'
Montgomery, Statistical Quality Control
#i-chart, moving range to estimate st. dev. is equal to 2 points with testType=1, data(rawWeight) ichart=spc(x=rawWeight$rawWeight, sg=2, type="i", name="weight", testType=1) plot(ichart) summary(ichart)