how can i remove outliers in my data
Show older comments
Hi everyone, Hope everyone doing Good I have some problem. when I run my codes to find the probability I got some errors due to outliers Values. Could anyone help me, how i can remove outlier values? I have a dataset in excel. Thank you :)
3 Comments
Paolo
on 28 May 2018
That very much depends on the data you are working with. You could simply define a set number of standard deviations from the mean and remove data below and above said threshold.
Drewsky3
on 12 Dec 2019
How would you go about coding this? I am very bad at statistics. . .
Image Analyst
on 12 Dec 2019
Like I said in my Answer below (scroll down past this "Comments" section down to the official "Answers" section at the bottom of the page):
TF = isoutlier(A);
% Now remove outliers from A
A(TF) = []; % or equivalently, A = A(~TF);
Answers (1)
Image Analyst
on 28 May 2018
0 votes
Did you check the help?
"TF = isoutlier(A) returns a logical array whose elements are true when an outlier is detected in the corresponding element of A. By default, an outlier is a value that is more than three scaled median absolute deviations (MAD) away from the median. If A is a matrix or table, then isoutlier operates on each column separately. If A is a multidimensional array, then isoutlier operates along the first dimension whose size does not equal 1."
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!