0

What I have: A scatter chart(plot) of PCA. Plotted in JS. I have Rtools that Ive used to push PCA data to the client side.

Assumption : The author in this post draws confidence ellipses around the iris groups

What I'm trying to do: Get a confidence ellipse formula and/or get the raw data for the ellipse.

I can't seem to find a straight forward formula for the CI ellipse. I came across a lot of theory and a lot of examples in R which give you the end result - an ellipse (One can use ggplot or CRAN to plot it). But Im looking for a formula that I could use in the client side to plug my scatter chart points and calculate the ellipse or even better a function in R that would give me a formula for the ellipse. I have the covariance matrix and Eigen vectors as well (calculated in R).

Since PCA is a new thing for me please be patient and maybe explain your answer a bit. Looking for a formula dependant on point coordinates (x,y)

All suggestions much appreciated.

Neil Varnas
  • 161
  • 5
  • "Confidence" and "PCA" don't go together. It sounds like you might want to plot an ellipse to visualize the eigenvectors and eigenvalues in PCA. For many solutions, please [search our site](http://stats.stackexchange.com/search?q=confidence+ellipse). – whuber Dec 07 '16 at 16:33
  • @whuber oh it's a probability ellipse I'm after, sorry about that. I'll edit my question. The function explanation in this example led me to believe it's a confidence ellipse https://www.google.co.uk/amp/s/www.r-bloggers.com/computing-and-visualizing-pca-in-r/amp/?client=safari – Neil Varnas Dec 07 '16 at 17:09
  • @whuber I would like to disagree, this is not a duplicate. The person in your linked question is asking for code to draw Eigen vectors and ellipses. Here Im asking for either a formula and/or how to extract points for the ellipse. Another interesting thing came out is - what kind of ellipse is it. I thought its Confidence ellipse but apparently, it could be a different type. – Neil Varnas Dec 08 '16 at 07:52
  • Haven't found a formula but after using **Momocs:::conf_ell** [library](http://vbonhomme.github.io/Momocsdoc/conf_ell.html) I managed to get the vertices and the x,y points of an ellipse. I will update this answer once I find the second part to my answer - a straight forward formula. – Neil Varnas Dec 08 '16 at 07:53
  • An extension of this question [here](http://stackoverflow.com/questions/41055728/ellipse-type-in-pca-example?noredirect=1#comment69324639_41055728) – Neil Varnas Dec 09 '16 at 12:36

0 Answers0