<!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 the 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 npqcs.S"><tr><td>npqcs.S</td><td style="text-align: right;">R Documentation</td></tr></table>

<h2>Function to plot the S chart</h2>

<h3>Description</h3>

<p>This function is used to compute statistics required by the S chart.
</p>


<h3>Usage</h3>

<pre>
npqcs.S(x, ...)

## Default S3 method:
npqcs.S(
  x,
  G,
  data.name = NULL,
  limits = NULL,
  method = c("Tukey", "Liu", "Mahalanobis", "RP", "LD"),
  alpha = 0.01,
  plot = FALSE,
  standardize = FALSE,
  ...
)

## S3 method for class 'npqcd'
npqcs.S(
  x,
  data.name,
  limits = NULL,
  method = c("Tukey", "Liu", "Mahalanobis", "RP", "LD"),
  alpha = 0.01,
  plot = FALSE,
  standardize = F,
  ...
)
</pre>


<h3>Arguments</h3>

<table summary="R argblock">
<tr valign="top"><td><code>x</code></td>
<td>
<p>An object npqcd (Non parametric Quality Control Data)</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>G</code></td>
<td>
<p>The x as a matrix, data frame or list. If it is a matrix or data frame, then each row is viewed as one multivariate observation.</p>
</td></tr>
<tr valign="top"><td><code>data.name</code></td>
<td>
<p>a string that specifies the title displayed on the plots. 
If not provided it is taken from the name of the object x.</p>
</td></tr>
<tr valign="top"><td><code>limits</code></td>
<td>
<p>a two-value vector specifying the control limits lower and central.</p>
</td></tr>
<tr valign="top"><td><code>method</code></td>
<td>
<p>Character string which determines the depth function used. 
method can be &quot;Tukey&quot; (the default), &quot;Liu&quot;, &quot;Mahalanobis&quot;, &quot;RP&quot; Random Project or &quot;LD&quot; Likelihood depth.</p>
</td></tr>
<tr valign="top"><td><code>alpha</code></td>
<td>
<p>it is the the significance level (0.01 for default)</p>
</td></tr>
<tr valign="top"><td><code>plot</code></td>
<td>
<p>a logical value indicating it should be plotted.</p>
</td></tr>
<tr valign="top"><td><code>standardize</code></td>
<td>
<p>a logical value indicating data should be standardized.</p>
</td></tr>
</table>


<h3>References</h3>

<p>Regina Liu (1995)
</p>


<h3>Examples</h3>

<pre>
## Not run: 
##
##  Continuous data 
##
set.seed(12345)
mu&lt;-c(0,0)
Sigma&lt;- matrix(c(1,0,0,1),nrow = 2,ncol = 2)
u &lt;- c(2,2)
S &lt;- matrix(c(4,0,0,4),nrow = 2,ncol = 2)
G &lt;- rmvnorm(540, mean = mu, sigma = Sigma)
x&lt;- rmvnorm(40,mean=u,sigma = S)
x.a &lt;- rbind(G[501:540,],x)
M &lt;- G[1:500,]
data.npqcd &lt;- npqcd(x.a,M)
res.npqcs &lt;- npqcs.S(data.npqcd,method = "Liu", alpha=0.05)
summary(res.npqcs)
plot(res.npqcs,title =" S Control Chart")
## End(Not run)
</pre>


</body></html>
