<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thank you for your response, Eelke.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I guess it makes sense but it does make the selection of a threshold more arbitrary. </div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
If your underlying distribution is normal, then a z-score of 3, 4 or 5 has a clear meaning in terms of outlier detection. </div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
For a non-Gaussian distribution, that interpretation no longer holds, and rejection becomes less automated and more open to subjective interpretation.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Isn't it better to z-transform the Hilbert-envelope values with the mean/std or the median/mad of the original filtered EEG distribution rather than the mean/std or median/mad of the hilbert values distribution? That way, the meaning of the threshold magnitude
 would remain valid. Or is that what is happening in the code already?</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Best,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Kris</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style=""><font color="#000000" face="Calibri, Arial, Helvetica, sans-serif"><br>
</font></div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> fieldtrip <fieldtrip-bounces@science.ru.nl> on behalf of Eelke Spaak <e.spaak@donders.ru.nl><br>
<b>Sent:</b> 18 February 2020 10:45<br>
<b>To:</b> FieldTrip discussion list <fieldtrip@science.ru.nl><br>
<b>Subject:</b> Re: [FieldTrip] question about automatic artefact rejection</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Dear Kris,<br>
<br>
Since there is no statistical test involved, I see no problems with<br>
computing a z-score here. Think of it more as bringing the data into a<br>
sensible range and allowing yourself to forget about details like<br>
measurement unit etc. You could also not do the z-transform, and<br>
simply specify a threshold based on raw amplitude, this would be<br>
equivalent (but might make it potentially more difficult to come up<br>
with a good threshold).<br>
<br>
Best,<br>
Eelke<br>
<br>
On Tue, 18 Feb 2020 at 09:47, De Meyer, Kris <kris.de_meyer@kcl.ac.uk> wrote:<br>
><br>
> Dear Fieldtrippers,<br>
><br>
> In ft_artifact_muscle, an EEG signal is first filtered - usually with a bandpass filter with cutoff frequencies of [110,140]. The documentation then says that the hilbert envelope is calculated, after which the envelope values are z-transformed before they
 are thresholded.<br>
><br>
> However, is this sound? Whereas the actual filtered EEG values (the result of the bandpass filter) are usually normally distributed, the hilbert envelope values are far from.<br>
><br>
> What is the rationale for calculating the z-transform of a non-Gaussian distribution? Doesn't that introduce problems?<br>
><br>
> Best,<br>
><br>
> Kris<br>
><br>
><br>
><br>
><br>
><br>
> _______________________________________________<br>
> fieldtrip mailing list<br>
> <a href="https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&amp;data=01%7C01%7Ckris.de_meyer%40kcl.ac.uk%7C87c72918f62a46527c2408d7b4676f15%7C8370cf1416f34c16b83c724071654356%7C0&amp;sdata=miiXPIhNF0zd23xrFrXakUxAUldGY6DZLnhoajNtLlg%3D&amp;reserved=0">
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&amp;data=01%7C01%7Ckris.de_meyer%40kcl.ac.uk%7C87c72918f62a46527c2408d7b4676f15%7C8370cf1416f34c16b83c724071654356%7C0&amp;sdata=miiXPIhNF0zd23xrFrXakUxAUldGY6DZLnhoajNtLlg%3D&amp;reserved=0</a><br>
> <a href="https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoi.org%2F10.1371%2Fjournal.pcbi.1002202&amp;data=01%7C01%7Ckris.de_meyer%40kcl.ac.uk%7C87c72918f62a46527c2408d7b4676f15%7C8370cf1416f34c16b83c724071654356%7C0&amp;sdata=DNmcynQGcA4%2FAmDi8PSk8UE%2FBfy0Ce8yGRPr3Cv%2BvZ8%3D&amp;reserved=0">
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoi.org%2F10.1371%2Fjournal.pcbi.1002202&amp;data=01%7C01%7Ckris.de_meyer%40kcl.ac.uk%7C87c72918f62a46527c2408d7b4676f15%7C8370cf1416f34c16b83c724071654356%7C0&amp;sdata=DNmcynQGcA4%2FAmDi8PSk8UE%2FBfy0Ce8yGRPr3Cv%2BvZ8%3D&amp;reserved=0</a><br>
<br>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&amp;data=01%7C01%7Ckris.de_meyer%40kcl.ac.uk%7C87c72918f62a46527c2408d7b4676f15%7C8370cf1416f34c16b83c724071654356%7C0&amp;sdata=miiXPIhNF0zd23xrFrXakUxAUldGY6DZLnhoajNtLlg%3D&amp;reserved=0">https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&amp;data=01%7C01%7Ckris.de_meyer%40kcl.ac.uk%7C87c72918f62a46527c2408d7b4676f15%7C8370cf1416f34c16b83c724071654356%7C0&amp;sdata=miiXPIhNF0zd23xrFrXakUxAUldGY6DZLnhoajNtLlg%3D&amp;reserved=0</a><br>
<a href="https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoi.org%2F10.1371%2Fjournal.pcbi.1002202&amp;data=01%7C01%7Ckris.de_meyer%40kcl.ac.uk%7C87c72918f62a46527c2408d7b4676f15%7C8370cf1416f34c16b83c724071654356%7C0&amp;sdata=DNmcynQGcA4%2FAmDi8PSk8UE%2FBfy0Ce8yGRPr3Cv%2BvZ8%3D&amp;reserved=0">https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoi.org%2F10.1371%2Fjournal.pcbi.1002202&amp;data=01%7C01%7Ckris.de_meyer%40kcl.ac.uk%7C87c72918f62a46527c2408d7b4676f15%7C8370cf1416f34c16b83c724071654356%7C0&amp;sdata=DNmcynQGcA4%2FAmDi8PSk8UE%2FBfy0Ce8yGRPr3Cv%2BvZ8%3D&amp;reserved=0</a><br>
</div>
</span></font></div>
</body>
</html>