⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cov.rob.html

📁 本程序是基于linux系统下c++代码
💻 HTML
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>R: Resistant Estimation of Multivariate Location and Scatter</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="../../R.css">
</head><body>

<table width="100%" summary="page for cov.rob {MASS}"><tr><td>cov.rob {MASS}</td><td align="right">R Documentation</td></tr></table>
<h2>Resistant Estimation of Multivariate Location and Scatter</h2>


<h3>Description</h3>

<p>
Compute a multivariate location and scale estimate with a high
breakdown point &ndash; this can be thought of as estimating the mean and
covariance of the <code>good</code> part of the data. <code>cov.mve</code> and
<code>cov.mcd</code> are compatibility wrappers.
</p>


<h3>Usage</h3>

<pre>
cov.rob(x, cor = FALSE, quantile.used = floor((n + p + 1)/2),
        method = c("mve", "mcd", "classical"),
        nsamp = "best", seed)

cov.mve(...)
cov.mcd(...)
</pre>


<h3>Arguments</h3>

<table summary="R argblock">
<tr valign="top"><td><code>x</code></td>
<td>
a matrix or data frame.
</td></tr>
<tr valign="top"><td><code>cor</code></td>
<td>
should the returned result include a correlation matrix?
</td></tr>
<tr valign="top"><td><code>quantile.used</code></td>
<td>
the minimum number of the data points regarded as <code>good</code> points.
</td></tr>
<tr valign="top"><td><code>method</code></td>
<td>
the method to be used &ndash; minimum volume ellipsoid, minimum
covariance determinant or classical product-moment. Using
<code>cov.mve</code> or <code>cov.mcd</code> forces <code>mve</code> or <code>mcd</code>
respectively.
</td></tr>
<tr valign="top"><td><code>nsamp</code></td>
<td>
the number of samples or <code>"best"</code> or <code>"exact"</code> or
<code>"sample"</code>.
If <code>"sample"</code> the number chosen is <code>min(5*p, 3000)</code>, taken
from Rousseeuw and Hubert (1997). If <code>"best"</code> exhaustive
enumeration is done up to 5000 samples: if <code>"exact"</code>
exhaustive enumeration will be attempted however many samples are needed.
</td></tr>
<tr valign="top"><td><code>seed</code></td>
<td>
the seed to be used for random sampling: see <code><a href="../../base/html/Random.html">RNGkind</a></code>. The
current value of <code>.Random.seed</code> will be preserved if it is set.
</td></tr>
<tr valign="top"><td><code>...</code></td>
<td>
arguments to <code>cov.rob</code> other than <code>method</code>.</td></tr>
</table>

<h3>Details</h3>

<p>
For method <code>"mve"</code>, an approximate search is made of a subset of
size <code>quantile.used</code> with an enclosing ellipsoid of smallest volume; in
method <code>"mcd"</code> it is the volume of the Gaussian confidence
ellipsoid, equivalently the determinant of the classical covariance
matrix, that is minimized. The mean of the subset provides a first
estimate of the location, and the rescaled covariance matrix a first
estimate of scatter. The Mahalanobis distances of all the points from
the location estimate for this covariance matrix are calculated, and
those points within the 97.5% point under Gaussian assumptions are
declared to be <code>good</code>. The final estimates are the mean and rescaled
covariance of the <code>good</code> points.
</p>
<p>
The rescaling is by the appropriate percentile under Gaussian data; in
addition the first covariance matrix has an <EM>ad hoc</EM> finite-sample
correction given by Marazzi.
</p>
<p>
For method <code>"mve"</code> the search is made over ellipsoids determined
by the covariance matrix of <code>p</code> of the data points. For method
<code>"mcd"</code> an additional improvement step suggested by Rousseeuw and
van Driessen (1999) is used, in which once a subset of size
<code>quantile.used</code> is selected, an ellipsoid based on its covariance
is tested (as this will have no larger a determinant, and may be smaller).
</p>


<h3>Value</h3>

<p>
A list with components
</p>
<table summary="R argblock">
<tr valign="top"><td><code>center</code></td>
<td>
the final estimate of location.
</td></tr>
<tr valign="top"><td><code>cov</code></td>
<td>
the final estimate of scatter.
</td></tr>
<tr valign="top"><td><code>cor</code></td>
<td>
(only is <code>cor = TRUE</code>) the estimate of the correlation
matrix.
</td></tr>
<tr valign="top"><td><code>sing</code></td>
<td>
message giving number of singular samples out of total
</td></tr>
<tr valign="top"><td><code>crit</code></td>
<td>
the value of the criterion on log scale. For MCD this is
the determinant, and for MVE it is proportional to the volume.
</td></tr>
<tr valign="top"><td><code>best</code></td>
<td>
the subset used. For MVE the best sample, for MCD the best
set of size <code>quantile.used</code>.
</td></tr>
<tr valign="top"><td><code>n.obs</code></td>
<td>
total number of observations.
</td></tr>
</table>

<h3>Author(s)</h3>

<p>
B.D. Ripley
</p>


<h3>References</h3>

<p>
P. J. Rousseeuw and A. M. Leroy (1987) 
<EM>Robust Regression and Outlier Detection.</EM>
Wiley.
</p>
<p>
A. Marazzi (1993) 
<EM>Algorithms, Routines and S Functions for Robust Statistics.</EM>
Wadsworth and Brooks/Cole. 
</p>
<p>
P. J. Rousseeuw and B. C. van Zomeren (1990) Unmasking
multivariate outliers and leverage points, 
<EM>Journal of the American Statistical Association</EM>, <B>85</B>, 633&ndash;639.
</p>
<p>
P. J. Rousseeuw and K. van Driessen (1999) A fast algorithm for the
minimum covariance determinant estimator. <EM>Technometrics</EM>
<B>41</B>, 212&ndash;223.
</p>
<p>
P. Rousseeuw and M. Hubert (1997) Recent developments in PROGRESS. In
<EM>L1-Statistical Procedures and Related Topics </EM>
ed Y. Dodge, IMS Lecture Notes volume <B>31</B>, pp. 201&ndash;214.
</p>


<h3>See Also</h3>

<p>
<code><a href="lqs.html">lqs</a></code>
</p>


<h3>Examples</h3>

<pre>
set.seed(123)
cov.rob(stackloss)
cov.rob(stack.x, method = "mcd", nsamp = "exact")
</pre>



<hr><div align="center">[Package <em>MASS</em> version 7.2-44 <a href="00Index.html">Index]</a></div>

</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -