Dear all,
Happy New Year. Wish you a very successful year!
I am creating PCA plots in R in an automated way and need a script to define whether the sample (red dot on the figure) is outside/within the circle. Does anyone have a good solution for it?
So far I've been using mahalanobis distance and then seeing whether the distance for the sample is within 80th percentile or not. The problem is that mahalanobis distance is in the multidimensional space, while pca plot is shown in 2D. So, sometimes, I would get a message that the point is located outside of the ellipse (in multidimensional space), while in 2D it is within the ellipse.
Thanks a lot for your advice!
Happy New Year. Wish you a very successful year!
I am creating PCA plots in R in an automated way and need a script to define whether the sample (red dot on the figure) is outside/within the circle. Does anyone have a good solution for it?
So far I've been using mahalanobis distance and then seeing whether the distance for the sample is within 80th percentile or not. The problem is that mahalanobis distance is in the multidimensional space, while pca plot is shown in 2D. So, sometimes, I would get a message that the point is located outside of the ellipse (in multidimensional space), while in 2D it is within the ellipse.
Thanks a lot for your advice!
Attachments
-
12 KB Views: 1