Description Usage Arguments Details Value Author(s) References See Also Examples
These functions are used to compute statistics required by the xbar chart for one-at-time data.
1 2 3 | stats.xbar.one(data, sizes)
sd.xbar.one(data, sizes, std.dev = c("MR", "SD"), k=2)
limits.xbar.one(center, std.dev, sizes, conf)
|
data |
the observed data values |
center |
sample/group center statistic. |
sizes |
samples sizes. Not needed, size=1 is used. |
k |
number of successive pairs of observations for computing the standard deviation based on moving ranges of k points. |
std.dev |
within group standard deviation. Optional for |
conf |
a numeric value used to compute control limits, specifying the number of standard deviations (if |
Methods available for estimating the process standard deviation:
Method | Description |
"MR" | moving range: this is estimate is based on the scaled mean of moving ranges |
"SD" | sample standard deviation: this estimate is defined as as(x)/cd(n), where n = number of observations x. |
The function stats.xbar.one
returns a list with components statistics
and center
.
The function sd.xbar.one
returns std.dev
the standard deviation of the statistic charted.
The function limits.xbar.one
returns a matrix with lower and upper control limits.
Luca Scrucca
Montgomery, D.C. (2005) Introduction to Statistical Quality Control, 5th ed. New York: John Wiley & Sons.
Ryan T.P. (2000) Statistical Methods for Quality Improvement, New York: John Wiley & Sons.
Wetherill, G.B. and Brown, D.W. (1991) Statistical Process Control. New York: Chapman & Hall.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # Water content of antifreeze data (Wetherill and Brown, 1991, p. 120)
x <- c(2.23, 2.53, 2.62, 2.63, 2.58, 2.44, 2.49, 2.34, 2.95, 2.54, 2.60, 2.45,
2.17, 2.58, 2.57, 2.44, 2.38, 2.23, 2.23, 2.54, 2.66, 2.84, 2.81, 2.39,
2.56, 2.70, 3.00, 2.81, 2.77, 2.89, 2.54, 2.98, 2.35, 2.53)
# the Shewhart control chart for one-at-time data
# 1) using MR (default)
qcc(x, type="xbar.one", data.name="Water content (in ppm) of batches of antifreeze")
# 2) using SD
qcc(x, type="xbar.one", std.dev = "SD", data.name="Water content (in ppm) of batches of antifreeze")
# "as the size increases further, we would expect sigma-hat to settle down
# at a value close to the overall sigma-hat" (Wetherill and Brown, 1991,
# p. 121)
sigma <- NA
k <- 2:24
for (j in k)
sigma[j] <- sd.xbar.one(x, k=j)
plot(k, sigma[k], type="b") # plot estimates of sigma for
abline(h=sd(x), col=2, lty=2) # different values of k
|
Package 'qcc' version 2.7
Type 'citation("qcc")' for citing this R package in publications.
List of 11
$ call : language qcc(data = x, type = "xbar.one", data.name = "Water content (in ppm) of batches of antifreeze")
$ type : chr "xbar.one"
$ data.name : chr "Water content (in ppm) of batches of antifreeze"
$ data : num [1:34, 1] 2.23 2.53 2.62 2.63 2.58 2.44 2.49 2.34 2.95 2.54 ...
..- attr(*, "dimnames")=List of 2
$ statistics: Named num [1:34] 2.23 2.53 2.62 2.63 2.58 2.44 2.49 2.34 2.95 2.54 ...
..- attr(*, "names")= chr [1:34] "1" "2" "3" "4" ...
$ sizes : int [1:34] 1 1 1 1 1 1 1 1 1 1 ...
$ center : num 2.57
$ std.dev : num 0.179
$ nsigmas : num 3
$ limits : num [1, 1:2] 2.03 3.11
..- attr(*, "dimnames")=List of 2
$ violations:List of 2
- attr(*, "class")= chr "qcc"
List of 11
$ call : language qcc(data = x, type = "xbar.one", std.dev = "SD", data.name = "Water content (in ppm) of batches of antifreeze")
$ type : chr "xbar.one"
$ data.name : chr "Water content (in ppm) of batches of antifreeze"
$ data : num [1:34, 1] 2.23 2.53 2.62 2.63 2.58 2.44 2.49 2.34 2.95 2.54 ...
..- attr(*, "dimnames")=List of 2
$ statistics: Named num [1:34] 2.23 2.53 2.62 2.63 2.58 2.44 2.49 2.34 2.95 2.54 ...
..- attr(*, "names")= chr [1:34] "1" "2" "3" "4" ...
$ sizes : int [1:34] 1 1 1 1 1 1 1 1 1 1 ...
$ center : num 2.57
$ std.dev : num 0.222
$ nsigmas : num 3
$ limits : num [1, 1:2] 1.9 3.23
..- attr(*, "dimnames")=List of 2
$ violations:List of 2
- attr(*, "class")= chr "qcc"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.