I am trying to make confidence ellipses of the mean of a scatterplot of morphometric data. The data is subdivided into several groups. I would like to make a confidence ellipse of the mean for each group.
You can use the R skript of Andrew L Jackson and his SIBER approach.
SIBER: Stable Isotope Bayesian Ellipses in R
SIBER is subset of functions within the SIAR package and allow for analysis of analysis of data in isotope-space as opposed to diet-space such as in the mixing model side of siar. The scripts supporting these podcasts can be found here as a zip file. The SIBER functions and routines are obtainable within the R package siar and are based on the paper Jackson, A.L., Parnell, A.C., Inger R., & Bearhop, S. 2011. Comparing isotopic niche widths among and within communities: SIBER – Stable Isotope Bayesian Ellipses in R. Journal of Animal Ecology, 80, 595-602. doi
Introduction to SIBER: comparisons among communities or among community members? podcast
Using ellipses to compare community members: podcast
How do I know if the confidence ellipse calculated is referring to the confidence ellipse of the mean and not the confidence ellipse of the of the frequency distribution? I am interested in finding a package that obtains the confidence ellipse of the group means.
Either you use a package that gives you ConfEllipses directly (such as MATHEMATICA, or you encode the algorithm in R youself (find the PC axis and use SQRT(principal components) as axes lengths.
I would like to add a few cautioning words:
(1) The confidence ellipses are constructed assuming that the sample (around which you are graphing the ConfEll) are drawn from a normal Distribution (not necessarily from a N(0,1) z-Distribution).
(2) Even mor important: if you are working/researching in dimensions higher than 2: the elipsses become Ellipsoids, and graphical Rendering (even for 3D) becomes difficult.
NOTE, however: the porjections of the PC axes into 2D do not yoield the PC of a 2D. (Did I make mayself clear?) In other words: if you Group means have 5 components, say, then you will get 5 PC axes. Even the 1st axes, projected into 2D space, will not be in the same direction as the principal Axis of a 2D PrinCompAnalysis. So you might sit back and wonder whether you shouldn' use some other tool to communicate your findings. Maybe ConfEllp are not the tool to use. (Have you checked whether the projections are normally distributed (using MLE, not Kolmogornow-Smirnov!)?
Please ask further, if I can help clarify. Hermann