predict.ellipsoid {cluster}R Documentation

Predict Method for Ellipsoid Objects


Compute points on the ellipsoid boundary, mostly for drawing.


predict.ellipsoid(object, n.out=201, ...)
## S3 method for class 'ellipsoid':
predict(object, n.out=201, ...)
ellipsoidPoints(A, d2, loc, n=201)


object an object of class ellipsoid, typically from ellipsoidhull(); alternatively any list-like object with proper components, see details below.
n.out,n the number of points to create.
A, d2, loc arguments of the auxilary ellipsoidPoints, see below.
... passed to and from methods.


Note ellipsoidPoints is the workhorse function of predict.ellipsoid a standalone function and method for ellipsoid objects, see ellipsoidhull. The class of object is not checked; it must solely have valid components loc (length p), the p x p matrix cov (corresponding to A) and d2 for the center, the shape (``covariance'') matrix and the squared average radius or distance.


a numeric matrix of dimension n.out times p.

See Also



 ## see also  example(ellipsoidhull)

## Robust vs. L.S. covariance matrix
x <- rt(200, df=3)
y <- 3*x + rt(200, df=2)
plot(x,y, main="non-normal data (N=200)")
X <- cbind(x,y) <- cov(X) ; <- colMeans(X)
lines(ellipsoidPoints(, d2 = 2,, col="green")
if(require(MASS)) {
  Cxy <- cov.rob(cbind(x,y))
  lines(ellipsoidPoints(Cxy$cov, d2 = 2, loc=Cxy$center), col="red")

[Package cluster version 1.9.8 Index]