0

As titled, my friend and I are taking the advanced quantitative course, and we run into a dataset where we are asked to run the Mahalanobis Distance (MD) after creating a moderation interval. That became a long journey of running the MD and eliminating outliers one at a time. Is there a loop function that could simplify the process? The process we did is as follows:

  1. Add the MD values to the dataset
  2. Use a table to show the outliers that is above the cutoff point
  3. Eliminate the largest outlier in the table.
  4. Rerun MD

Any help would be greatly appreciated. TIA!

Rui Barradas
  • 70,273
  • 8
  • 34
  • 66
Hieru
  • 1
  • Maybe [this R-bloggers post](https://www.r-bloggers.com/2016/12/outlier-detection-with-mahalanobis-distance/) can help. But the question is off-topic in SO. – Rui Barradas Oct 02 '22 at 05:47

0 Answers0