I am creating a PCA model in R and would like to know whether my sample (red) is within or outside the ellipse. Could you maybe help me how to do that?
At the moment I am using Mahalanobis distance, but in some cases it predicts wrongly, since it is in a multivariate space and here I use only two principal components.
The code i am using to create a plot:
plt <- autoplot(
pcaAroma,
data = keepRows,
colour = 'Woi',
frame.type = 'norm',
type = "cairo",
res=100,
size = 4
)