ellipses {compositions} | R Documentation |
Draws ellipses from a mean and a variance into a plot.
ellipses(mean,...) ## S3 method for class 'acomp': ellipses(mean,var,r=1,...,steps=360) ## S3 method for class 'rcomp': ellipses(mean,var,r=1,...,steps=360) ## S3 method for class 'aplus': ellipses(mean,var,r=1,...,steps=360) ## S3 method for class 'rplus': ellipses(mean,var,r=1,...,steps=360) ## S3 method for class 'rmult': ellipses(mean,var,r=1,...,steps=360)
mean |
a dataset/vector of means or midpoints of the ellipses |
var |
a variance matrix or a set of variance matrices given by
var[i,,] . The principal axis of the variance give the axis of
the ellipses, whereas the square-root of the eigenvalues times r give the
half-diameters of the ellipse. |
r |
a scaling of the half-diameters |
... |
further graphical parameters |
steps |
the number of discretisation points to draw the ellipses. |
The ellipse drawn is given by the solutions of
(x-mean)^tvar^{-1}(x-mean)=r^2
in the respective geometry of the parameter space. Note that these ellipses can be added to panel plots (by means of orthogonal projections in the corresponding geometry).
K.Gerald v.d. Boogaart http://www.stat.boogaart.de
data(SimulatedAmounts) plot(acomp(sa.lognormals)) tt<-acomp(sa.lognormals); ellipses(mean(tt),var(tt),r=2,col="red") tt<-rcomp(sa.lognormals); ellipses(mean(tt),var(tt),r=2,col="blue") plot(aplus(sa.lognormals[,1:2])) tt<-aplus(sa.lognormals[,1:2]); ellipses(mean(tt),var(tt),r=2,col="red") tt<-rplus(sa.lognormals[,1:2]); ellipses(mean(tt),var(tt),r=2,col="blue") plot(rplus(sa.lognormals[,1:2])) tt<-aplus(sa.lognormals[,1:2]); ellipses(mean(tt),var(tt),r=2,col="red") tt<-rplus(sa.lognormals[,1:2]); ellipses(mean(tt),var(tt),r=2,col="blue") tt<-rmult(sa.lognormals[,1:2]); ellipses(mean(tt),var(tt),r=2,col="green")