ewma | R Documentation |
Create an object of class 'ewma.qcc'
to compute and draw an Exponential Weighted Moving Average (EWMA) chart for statistical quality control.
ewma(data, sizes, center, std.dev, lambda = 0.2, nsigmas = 3, newdata, newsizes, ...) ## S3 method for class 'ewma.qcc' print(x, digits = getOption("digits"), ...) ## S3 method for class 'ewma.qcc' plot(x, xtime, add.stats = qcc.options("add.stats"), chart.all = qcc.options("chart.all"), fill = qcc.options("fill"), label.center = "CL", label.limits = c("LCL", "UCL"), title, xlab, ylab, xlim, ylim, digits = getOption("digits"), ...)
data |
a data frame, a matrix or a vector containing observed data for the variable to chart. Each row of a data frame or a matrix, and each value of a vector, refers to a sample or ”rationale group”. |
sizes |
a value or a vector of values specifying the sample sizes associated with each group. If not provided the sample sizes are obtained counting the non- |
center |
a value specifying the center of group statistics or target. |
std.dev |
a value or an available method specifying the within-group standard deviation(s) of the process. |
lambda |
the smoothing parameter 0 <= lambda <= 1 |
nsigmas |
a numeric value specifying the number of sigmas to use for computing control limits. |
newdata |
a data frame, matrix or vector, as for the |
newsizes |
a vector as for the |
xtime |
a vector of date-time values as returned by |
add.stats |
a logical value indicating whether statistics and other information should be printed at the bottom of the chart. |
chart.all |
a logical value indicating whether both statistics for |
fill |
a logical value specifying if the in-control area should be filled with the color specified in
|
label.center |
a character specifying the label for center line. |
label.limits |
a character vector specifying the labels for control limits. |
title |
a character string specifying the main title. Set |
xlab, ylab |
a string giving the label for the x-axis and the y-axis. |
xlim, ylim |
a numeric vector specifying the limits for the x-axis and the y-axis. |
digits |
the number of significant digits to use. |
x |
an object of class 'ewma.qcc'. |
... |
additional arguments to be passed to the generic function. |
EWMA chart smooths a series of data based on a moving average with weights which decay exponentially. Useful to detect small and permanent variation on the mean of the process.
Returns an object of class 'ewma.qcc'.
Luca Scrucca
Mason, R.L. and Young, J.C. (2002) Multivariate Statistical Process Control with Industrial Applications, SIAM.
Montgomery, D.C. (2013) Introduction to Statistical Quality Control, 7th ed. New York: John Wiley & Sons.
Ryan, T. P. (2011), Statistical Methods for Quality Improvement, 3rd ed. New York: John Wiley & Sons, Inc.
Scrucca, L. (2004). qcc: an R package for quality control charting and statistical process control. R News 4/1, 11-17.
Wetherill, G.B. and Brown, D.W. (1991) Statistical Process Control. New York: Chapman & Hall.
qcc
, ewmaSmooth
, cusum
## ## Grouped-data ## data(pistonrings) diameter <- qccGroups(data = pistonrings, diameter, sample) q = ewma(diameter[1:25,], lambda=0.2, nsigmas=3) summary(q) plot(q) ewma(diameter[1:25,], lambda=0.2, nsigmas=2.7, newdata=diameter[26:40,]) ## ## Individual observations ## data(viscosity) with(viscosity, ewma(viscosity[trial], lambda = 0.2, nsigmas = 2.7, newdata = viscosity[!trial]))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.