Page 1 of 2

Excluding outliers with MAD

Posted: Thu Jul 07, 2022 7:41 am
by Vicente_inefo
Hi, is there a way to make a filter for the exclusion of outliers using the median absolute deviation (MAD) proposed by Leys et al., 2013 (https://www.sciencedirect.com/science/a ... 3113000668)

i.e. Median ± 2.5 * MAD.

Thanks in advance

Re: Excluding outliers with MAD

Posted: Thu Jul 07, 2022 7:54 pm
by MAgojam
Hey @Vicente_inefo,

if you need it, my suggestion is the example with this screenshot:
Filter_MAD.png
Filter_MAD.png (59.76 KiB) Viewed 11750 times
Cheers,
Maurizio

UPDATE 2022-09-28
Sorry for the hint attached with the broken formula.
The attachment with the correct suggestion is in the post below, as a response to @anagrammarian, who drew my attention to the breakup.
Maurizio

Re: Excluding outliers with MAD

Posted: Sat Jul 09, 2022 10:24 am
by Vicente_inefo
Thanks for the suggestion @MAgojam, I think it could be useful. I was thinking on calculate robust MAD using JASP and then calculate upper and lower limits for the MAD method for detecting outliers and applying it in JAMOVI

Re: Excluding outliers with MAD

Posted: Tue Sep 27, 2022 4:52 pm
by anagrammarian
Maurizio,

I had a q re your formula. The original paper says M - 3 or 2.5* MAD and M + 3 or 2.5*MAD as the cutoffs. For MAD, they have an additional multiplier b which is 1.4826 i.e. MAD = b* MED(ABS( var - MED(var))) where b = 1.4826. Is there a reason why you omitted b in your formula? I noticed significantly more outliers obviously without that and adding 1.4826 and using 2.5 seemed to make sense.

Let me know what you think and thanks for introducing me to MAD.

-manoj

Re: Excluding outliers with MAD

Posted: Wed Sep 28, 2022 5:15 pm
by MAgojam
anagrammarian wrote:Is there a reason why you omitted b in your formula?
The reason is that I did not double check how I should have done and forgot to add the scale constant as defined by (Huber, 1981).
I apologize to everyone who has passed by the post and trusted my suggestion.

Thank you so much manoj, for getting my attention and replying with the correct suggestion.
Correct_formula_MAD.png
Correct_formula_MAD.png (60.73 KiB) Viewed 11377 times
Cheers,
Maurizio

Re: Excluding outliers with MAD

Posted: Thu Sep 29, 2022 9:25 am
by Vicente_inefo
I could confirm that the result of the proposed formula matches with the MAD result reported in JASP.

Thanks to all the participants.

Re: Excluding outliers with MAD

Posted: Sun Oct 02, 2022 5:55 am
by jonathon
should we add a MAD() function to our formula list?

jonathon

Re: Excluding outliers with MAD

Posted: Sun Oct 02, 2022 12:09 pm
by Vicente_inefo
It sounds good to me!!

Re: Excluding outliers with MAD

Posted: Wed Oct 12, 2022 11:03 pm
by jonathon
if someone can create an issue here, describing in detail how it's calculated, i'll see about adding it.

https://github.com/jamovi/jamovi/issues

cheers

jonathon

Re: Excluding outliers with MAD

Posted: Fri Oct 14, 2022 8:05 pm
by MAgojam
If it is of interest and can help, Rj is there:
Rj_mad.png
Rj_mad.png (76.57 KiB) Viewed 8805 times
Cheers,
Maurizio