[R] adding an ellipse to a PCA plot
Lukas Baitsch
lbaitsch at gmail.com
Mon Jun 6 16:32:37 CEST 2011
Hi,
I created a principal component plot using the first two principal
components. I used the function princomp() to calculate the scores.
now, I would like to superimpose an ellipse representing the center
and the 95% confidence interval of a series of points in my plot (as
to illustrate the grouping of my samples).
I looked at the ellipse() function in the ellipse package but can't
get it to work. the princomp()-function gives me the scores of each
point, so I can calculate the mean and the 95%-CI, but I can't
integrate this into the ellipse()-function). Is there a better way of
doing this or can someone help me figure out this function?
best regards,
Lukas
More information about the R-help
mailing list