[R] ellipse -confidence interval
Jari Oksanen
jari.oksanen at oulu.fi
Wed Jun 15 23:27:38 CEST 2005
On 15 Jun 2005, at 23:05, pgonzalez at fcnym.unlp.edu.ar wrote:
> Hi!, I made a plot with two variables representing the first two axis
> of a
> principle component analysis. My question is:
> How can I superimpose on such plot an ellipse that represent the 95%
> interval of
> confidence of scores?
>
You can't, because you don't know the confidence (or s.e.) of the
scores. Or this is the answer if you mean that each point in the plot
should be enclosed in its private confidence ellipse (some people may
come with ideas to get those s.e.'s: go tell the people if you find one
that works). On the other hand, if you want to enclose all points
within one ellipse, you can directly use ellipse package which requires
covariance matrix as input. If you prefer ellipsoid hulls, you can use
functions in cluster package. Package vegan has some examples of the
use of ellipse package (see ordiellipse there).
Some people are hypersensitive to "principle" components (beware).
cheers, jari oksanen
--
Jari Oksanen, Oulu, Finland
More information about the R-help
mailing list