<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Function to plot Shewhart S chart</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="R.css" />
</head><body>

<table width="100%" summary="page for qcs.S"><tr><td>qcs.S</td><td style="text-align: right;">R Documentation</td></tr></table>

<h2>Function to plot Shewhart S chart</h2>

<h3>Description</h3>

<p>This function is used to compute statistics required by the S chart.
</p>


<h3>Usage</h3>

<pre>
qcs.S(x, ...)

## Default S3 method:
qcs.S(
  x,
  var.index = 1,
  sample.index = 2,
  covar.index = NULL,
  covar.names = NULL,
  data.name = NULL,
  sizes = NULL,
  center = NULL,
  std.dev = c("UWAVE-SD", "MVLUE-SD", "RMSDF"),
  conf.nsigma = 3,
  limits = NULL,
  plot = FALSE,
  ...
)

## S3 method for class 'qcd'
qcs.S(
  x,
  center = NULL,
  std.dev = c("UWAVE-SD", "MVLUE-SD", "RMSDF"),
  conf.nsigma = 3,
  limits = NULL,
  plot = FALSE,
  ...
)
</pre>


<h3>Arguments</h3>

<table summary="R argblock">
<tr valign="top"><td><code>x</code></td>
<td>
<p>an R object (used to select the method). See details.</p>
</td></tr>
<tr valign="top"><td><code>...</code></td>
<td>
<p>arguments passed to or from methods.</p>
</td></tr>
<tr valign="top"><td><code>var.index</code></td>
<td>
<p>a scalar with the column number corresponding to the observed data for
the variable (the variable quality).  Alternativelly can be a string with the
name of the quality variable.</p>
</td></tr>
<tr valign="top"><td><code>sample.index</code></td>
<td>
<p>a scalar with the column number corresponding to the index each
group (sample).</p>
</td></tr>
<tr valign="top"><td><code>covar.index</code></td>
<td>
<p>optional. A scalar or numeric vector with the column number(s)
corresponding to the covariate(s). Alternativelly it can be a character vector with
the names of the covariates.</p>
</td></tr>
<tr valign="top"><td><code>covar.names</code></td>
<td>
<p>optional. A string or vector of strings with names for the
covariate columns.  Only valid if there is more than one column of data. By
default, takes the names from the original object.</p>
</td></tr>
<tr valign="top"><td><code>data.name</code></td>
<td>
<p>a string specifying the name of the variable which appears on the
plots. If not provided it is taken from the object given as data.</p>
</td></tr>
<tr valign="top"><td><code>sizes</code></td>
<td>
<p>optional. A value or a vector of values specifying the sample sizes
associated with each group. For continuous data the sample sizes are obtained counting the non-<code>NA</code> elements##' of the sample.index vector. For attribute variable the argument sizes is required.</p>
</td></tr>
<tr valign="top"><td><code>center</code></td>
<td>
<p>a value specifying the center of group statistics or the
&rdquo;target&rdquo; value of the process.</p>
</td></tr>
<tr valign="top"><td><code>std.dev</code></td>
<td>
<p>a value or an available method specifying the within-group standard
deviation(s) of the process. Several methods are available for estimating the
standard deviation in case of a continuous process variable.</p>
</td></tr>
<tr valign="top"><td><code>conf.nsigma</code></td>
<td>
<p>a numeric value used to compute control limits, specifying the
number of standard deviations (if <code>conf.nsigma</code> &gt; 1) or the confidence level (if 0
&lt; <code>conf.nsigma</code> &lt; 1).</p>
</td></tr>
<tr valign="top"><td><code>limits</code></td>
<td>
<p>a two-values vector specifying control limits.</p>
</td></tr>
<tr valign="top"><td><code>plot</code></td>
<td>
<p>a logical value indicating should be plotted.</p>
</td></tr>
</table>


<h3>Details</h3>

<p>In the default method <code>qcs.S.default</code> parameter <code>x</code> is a matrix
or data-frame where it should contain data, index sample and, optionally, covariate(s).
</p>


<h3>See Also</h3>

<p><code>qcs</code>, <code>qcd</code>
</p>


<h3>Examples</h3>

<pre>

##
##  Continuous data 
##
library(qcr)
data(pistonrings)
str(pistonrings)
pistonrings.qcd&lt;-qcd(pistonrings)

class(pistonrings.qcd)

res.qcs &lt;- qcs.S(pistonrings.qcd)
class(res.qcs)
plot(res.qcs,title="Control Chart S for pistonrings")
summary(res.qcs)  

</pre>


</body></html>
