I am a new user of both python and R. I have begun using them to try and answer a scientific question that I have. What I am trying to do is the following:
- For a matrix, find the mean and standard deviation of each column.
- Remove all rows that contain any value outside of the column mean + or - 3 SD.
- After removing these rows, calculate a new mean and standard deviation and repeat this cycle until there are no longer any outliers.
This would be done with a matrix of approximately 1000 rows and 20 columns.
I would appreciate any guidance as I am really just learning. Thanks!