Dear Ida,<div><br></div><div><div>> Yes, for me it is very important to to lose the freq range of breathing.</div><div><br></div><div>How can you accurately measure 0.13-0.35 Hz activity with epochs shorter than 7.7 sec long? Isn't it theoretical requirement to have at least 1(sec)/0.13(Hz) = 7.7 sec long window to calculate 0.13 Hz?</div>
<div><br></div><div>> Now I installed V12.0.1.0b and will use as <b>the first step</b> Tools-->Basic FIR filter (new) with lower edge input as 0.1 Hz (range is from 0.1 - 0.35 Hz) which uses pop_eegfiltnew() .</div>
<div><br></div><div>Looks fine.</div><div><br></div><div>> I installed a plug in you suggested (cleanline) and there is still no Help provided,</div><div><br></div><div>Sorry that's most likely a bug. I know it's been while since I had noticed it. I reported it to Arno. Meanwhile, type 'help cleanline' in the comannd window please. You can pretty much use the default anyway.</div>
<div><br></div><div>> <b>Fourth step - </b> epoching: Freq of my interest is 0.13-0.35, but markers of interesting events are put manually (depending on value on additional pressure sensor measuring inhalation and exhalation). I often have considerable epochs overlapping (even 2 markers within one epoch) if I use larger range than [-3,2] so I suppose it is better not to have a large overlap. 7.7 sec long epoch would result very large overlap. Only I can do to avoid it is to erase markers, but than I will lose a lot of data. </div>
<div><div><br></div><div>As I wrote above, I'm very concerned with this. To capture a single cycle of 0.13 Hz sinusoid you need at least 7.7 sec. Think about it again.</div><div><br></div><div>> Is there any paper suggesting the limits of parameters of ICs that are required for the methods in this dialog box (for finding abnormal values, trends, impropable data, abnormal distributions, abnormal spectra)?</div>
<div><br></div><div>What do you mean by 'limits of parameters'? In the Delorme et al. (2007) it says 'total number of epochs to be rejected should be around 10%' and that's it. It's up to you what criteria to use to judge 'good' or 'bad'. Again, I recommend you should not overtrust kurtosis nor improbability. Use it moderately.</div>
<div><br></div><div>Makoto</div><div><div class="h5"></div></div></div><br><div class="gmail_quote">2013/2/20 ida miokovic <span dir="ltr"><<a href="mailto:ida.miokovic@gmail.com" target="_blank">ida.miokovic@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear Makoto,<div><br></div><div>Yes, for me it is very important to to lose the freq range of breathing.</div><div>I am using EEGLAB version V11.0.1.1b and with "Tools --> Filter the data --> Basic FIR filter" data is filtered with pop_eegfilt function (fir1 is checked). </div>
<div>Now I installed V12.0.1.0b and will use as <b>the first step</b> Tools-->Basic FIR filter (new) with lower edge input as 0.1 Hz (range is from 0.1 - 0.35 Hz) which uses pop_eegfiltnew() .</div><div><br></div><div>
I installed a plug in you suggested (cleanline) and there is still no Help provided, so I am not sure how to set the parameters in the pop up window (p, bandwith (what would be realistic value?), sliding window length and step size, window overlap smoothing factor, FFT padding factor)? Can I leave it default? What is a suggested range if I would like to remove 50Hz noise? Is 48 - 52 Hz too sharp? I would use this as <b>the second step.</b> Although, I read that it is possible that ICA finds this line noise, so if I do not understand these parameters, I could skip this step.</div>
<div><br></div><div>I will definitly <b>skip the step of automatical removal of bad channels</b> and try with your suggestion and use standard deviation:</div><div class="im"><div><p>stdData = std(EEG.data,0,2);</p><p>figure; bar(stdData)</p>
</div>
</div><div><div><b>Third step</b> would be re-reference to the average reference.</div><div><b>Fourth step - </b> epoching: Freq of my interest is 0.13-0.35, but markers of interesting events are put manually (depending on value on additional pressure sensor measuring inhalation and exhalation). I often have considerable epochs overlapping (even 2 markers within one epoch) if I use larger range than [-3,2] so I suppose it is better not to have a large overlap. 7.7 sec long epoch would result very large overlap. Only I can do to avoid it is to erase markers, but than I will lose a lot of data. </div>
<div><br></div><div><b>Fifth step</b> would be running ICA for the first time.</div><div><b>Sixth step</b> would be this semi-automatic rejection of bad epochs (recommended to be done on ICs) with Tools-->Reject data using ICA-->Reject data (all methods). I saw in Tutorial that <i>"<span style="line-height:19.046875px;font-size:13px;font-family:sans-serif">The user should </span><span style="line-height:19.046875px;font-size:13px;font-family:sans-serif">begin</span><span style="line-height:19.046875px;font-size:13px;font-family:sans-serif"> by visually rejecting epochs from some test data, then adjust parameters for one or more of the rejection measures, comparing the visually selected epochs with the results of the rejection measure. All the measures can capture both simulated and real data artifacts. In our experience, the most efficient measures seem to be frequency threshold and linear trend detection.</span>"</i>. Is there any paper suggesting the limits of parameters of ICs that are required for the methods in this dialog box (for finding abnormal values, trends, impropable data, abnormal distributions, abnormal spectra)?</div>
<div><br></div><div>As<b> the last step -</b> ICA will be re-run and components visually inspected/selected/removed.</div><div><br></div><div>Your guidelines helped me a lot to see what have been my mistakes in my procedure by now. I am very grateful for your help.</div>
<div><br></div><div>All the best,</div><div><br></div><div>Ida</div><div><div class="h5">
<div><span style="font-family:Helvetica,Arial,sans-serif;font-size:medium;text-align:justify;background-color:rgb(252,255,255)"><br></span></div><div><br></div>
<div><span style="font-family:Helvetica,Arial,sans-serif;font-size:medium;text-align:justify;background-color:rgb(252,255,255)"><br></span></div><div><span style="font-family:Helvetica,Arial,sans-serif;font-size:medium;text-align:justify;background-color:rgb(252,255,255)"><br>
</span></div><div><span style="font-family:Helvetica,Arial,sans-serif;font-size:medium;text-align:justify;background-color:rgb(252,255,255)"><br></span></div><div><br></div><div class="gmail_quote">On Mon, Feb 18, 2013 at 7:37 PM, Makoto Miyakoshi <span dir="ltr"><<a href="mailto:mmiyakoshi@ucsd.edu" target="_blank">mmiyakoshi@ucsd.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear Ida,<div><div><br></div><div>> 1. Highpass 0.1 Hz FIR filter (the frequency of my interest is very low breathing frequency 0.13 - 0. 35 Hz)</div>
</div><div><p>OK, I noticed that filter is very important for you. Make sure that you used pop_eegfiltnew() or firfilt(). See also <a href="http://sccn.ucsd.edu/wiki/Firfilt_FAQ" target="_blank">http://sccn.ucsd.edu/wiki/Firfilt_FAQ</a>. Please let me know if the latest version of EEGLAB DOES NOT have pop_eegfiltnew().</p>
<div>
<p>> 2. Notch short bandpass IIR 48 – 52 Hz filter for line noise removal</p></div><p>Do not use notch since we have much better solution. Check this out.</p><p><a href="http://www.nitrc.org/projects/cleanline/" target="_blank">http://www.nitrc.org/projects/cleanline/</a></p>
<div>
<p>> 3.<b> Automatic rejection of bad channels (Kurtosis,5) --> </b>Is it a problem if the automatic rejection is done on continuous data?</p></div><p>It depends on how clean the data need to be. In general, kurtosis is easily affected by outliers. If no data rejection is done, kurtosis may not be the best choise. I would start with simple code such as</p>
<p>stdData = std(EEG.data,0,2);</p><p>figure; bar(stdData)</p><p>If you find bad channel in this bargraph you may wan to check them visually to make decision. If you have too many data to eyeball, you may need to write a code to loop this.</p>
<div>
<p>> 4. re-referencing data to the average reference</p></div><p>This seems fine.</p><div><p>> 5. Epoching data around the markers of interest in segment [-3 2], baseline removal -3000 -2000 (ms).</p></div>
<p>If your freq of intrest is 0.13-0.35, then you should have at least 7.7 sec long (longer is better) for a epoch to obtain spectra at 0.13 Hz (I could be wrong in guessing what you want to do). </p><div>
<p>> <span style="color:rgb(34,34,34);font-size:14px;font-family:arial,sans-serif">What is wrong with rejecting componenets by map after first ICA?</span></p></div><p><font color="#222222" face="arial, sans-serif"><span style="font-size:14px"><a href="http://sccn.ucsd.edu/eeglab/eeglabfaq.html" target="_blank">http://sccn.ucsd.edu/eeglab/eeglabfaq.html</a></span></font></p>
<p></p><p align="justify" style="font-family:'MS PGothic';font-size:medium;background-color:rgb(252,255,255)"><font face="Helvetica, Arial, sans-serif"><big><font color="#ff0000"><b><font size="+1"><big>Re-running ICA</big></font></b></font></big></font></p>
<p align="justify" style="font-family:'MS PGothic';font-size:medium;background-color:rgb(252,255,255)"><font face="Helvetica, Arial, sans-serif"><b>Question:</b> While trying within EEGLAB to remove artifacts using ICA, I had trouble in recalculating an ICA decomposition after removing components. I tried to follow the guidelines in the tutorial, thinking that with fuzzy components it might work better to remove some clear artifact components first and the run a new ICA. When I tried to do that, the second ICA always took much longer and I got also some error message in the end telling me, that there was something wrong with the result.<br>
</font></p><p align="justify" style="font-family:'MS PGothic';font-size:medium;background-color:rgb(252,255,255)"><font face="Helvetica, Arial, sans-serif"><b>Answer:</b> The standard procedure we advise is first to perform ICA on the data and to remove bad trials using the ICA component activities. If you remove ICA components, the rank of the data will decrease (to <nchans). If the data have n channels, the rank of the data is (most probably) n. If you remove one component it will become n-1, and ICA will not be able to find n components in the pruned data). Thus, as a first step, you should only remove bad trials. This procedure will not alter the dimensionality of the data. As a second step, recompute ICA and remove bad components (the second run of ICA should result in clearer artifact components (for instance muscle at high frequencies), not contaminated by strong outlier trials. If you remove ICA components and want to re-run ICA, you must decompose the data with the 'pca' option to reduce the dimensionality of the decomposition to match the data rank (see below).</font></p>
<div>
<p></p><p>> I performed this rejection (step 3) and among 121 channels, around 10 (+-2) of them were rejected. Is it too much?</p></div><div>I think that' fine.</div><div><div><br></div><div>> Here, you mean to adjust the threshold value of the Kurtosis to end up with around 10% of the data to be rejected by this automatic method? </div>
<div><br></div></div><div>No. I meant in epoch rejection around 10% would be ok, not the number of channels.</div><div><div><br></div><div>> Could you please help me with what would be functions/commands for this in EEGLAB and would this be acceptable on contiuous channel or only epoched?</div>
<div><br></div></div><div>In the current EEGLAB continuous data can be rejected only by eyes. If you don't mind chopping up your data into epochs, check out eeg_regepochs().</div><div><div><br></div><div>> Somehow I have troubles finding it...could you please mail me the link to it?</div>
<div><br></div></div><div><span style="font-family:Arial;font-size:12px">Delorme, A., Sejnowski, T., Makeig, S. (2007) Improved rejection of artifacts from EEG data using high-order statistics and independent component analysis. </span><i style="font-family:Arial;font-size:12px">Neuroimage</i><span style="font-family:Arial;font-size:12px">, 34, 1443-1449.</span></div>
<div>
<div><span style="font-family:Arial;font-size:12px"><br></span></div><div>> Thank you for these encouraging words. If I understood you correctly, you are suggesting me to try run ICA after this automatic bad channels (in your case epochs) rejection but with thresholds of the Kurtosis 5, 10, 15? If not, what do you mean by rejection rate of the data?</div>
<div><br></div></div><div>Again I mean the number of epochs. In the guideline paper (Picton et al., 2000) it is stated that rejecting more than 30% of epochs may be a bad idea if the data were recorded from healthy adults.</div>
<span><font color="#888888">
<div><br></div><div>Makoto</div></font></span><div><div><br><div class="gmail_quote">2013/2/17 ida miokovic <span dir="ltr"><<a href="mailto:ida.miokovic@gmail.com" target="_blank">ida.miokovic@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Dear Makoto,<div><br></div><div>thank you very much for your response.</div><div><br></div><div>Actually, I performed Automatic rejection of bad channels on continuous data. The steps that lead to ICA decomposition were:</div>
<div><p>1. Highpass 0.1 Hz FIR filter (the frequency of my interest is very low breathing frequency 0.13 - 0. 35 Hz)</p>
<p>2. Notch short bandpass IIR 48 – 52 Hz filter for line noise removal</p>
<p>3.<b> Automatic rejection of bad channels (Kurtosis,5) --> </b>Is it a problem if the automatic rejection is done on continuous data?</p><p></p><p>4. re-referencing data to the average reference</p>
<p>5. Epoching data around the markers of interest in segment [-3 2],
baseline removal -3000 -2000 (ms).</p><p>6. Run ICA for the first time, reject bad ICs (by rejecting componenets by map), run ICA for the second time. --> I found your answer regarding the same issue: </p>
<p><i>If you want to obtain better ICA solution, what you should actually do</i></p><pre>><i> is to click 'Tools - Reject data using ICA - Reject data (all
</i>><i> methods)' and not 'Reject components by map'. You may have run epoch
</i>><i> rejection before running ICA. Similarly, you can run the same epoch
</i>><i> rejection after ICA on IC activities. If you want to know why and how
</i>><i> epoch rejection on IC activity is effective compared to raw EEG data,</i></pre><p>What is wrong with rejecting componenets by map after first ICA?</p><div><p>> Start with 5 and see the results. If it catches too many epochs, then<br>
> increase the value. I would use 8-10.<br></p></div><div>I performed this rejection (step 3) and among 121 channels, around 10 (+-2) of them were rejected. Is it too much?</div><div><div><br></div><div>> Adjust them so that the sum of epochs suggested by your rejection</div>
> methods ends up with around 10 % of the data.<p></p></div><p>Here, you mean to adjust the threshold value of the Kurtosis to end up with around 10% of the data to be rejected by this automatic method? I obtained that with Kurtosis threshold 5 (max 12 channels out of 121 were rejected).</p>
<div>
<p>> I would recommend that you simply threshold the data by amplitude<br>> first (+/- 150-200 microvolt, for example) to exclude undoubtedly<br>> wrong epochs due to loose channel etc (select up to 1% of data- but be<br>
> careful not to catch eye blinks), then apply probability method<br>> (select up to 3-5% of data). You may think the data is not clean yet,<br>> but apply ICA anyway, and do rejections on IC activities to select<br>
> another up to 5% of epochs if you want.</p></div><p>Could you please help me with what would be functions/commands for this in EEGLAB and would this be acceptable on contiuous channel or only epoched?</p><div>
<p>> Delorme et al. 2007 NeuroImage for epoch rejection using EEGLAB tools.</p></div><p>Somehow I have troubles finding it...could you please mail me the link to it?</p><div><p>
<br></p><p>> My general impression is that people spend too much time on data cleaning (especially psychologists; I've seen this because I'm a psychologist). > ICA decomposition is in many cases more robust than you think. If you want to prove it, try ICA with rejection rate of 5%, 10%, and 15%. I'll bet you > don't see much (or even any) difference in IC topos and spectra as long as you recorded the data in an ordinary laboratory environment. So don't be > too nervous.</p>
</div><p>Thank you for these encouraging words. If I understood you correctly, you are suggesting me to try run ICA after this automatic bad channels (in your case epochs) rejection but with thresholds of the Kurtosis 5, 10, 15? If not, what do you mean by rejection rate of the data?</p>
<p>Thank you very much in advance...Your help means a lot.</p><p>All the best.</p><span><font color="#888888"><p>Ida</p></font></span><div><div><div class="gmail_quote">On Mon, Feb 11, 2013 at 7:54 PM, Makoto Miyakoshi <span dir="ltr"><<a href="mailto:mmiyakoshi@ucsd.edu" target="_blank">mmiyakoshi@ucsd.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear Ida,<br>
<div><br>
> I didn't pay much attention to it assuming<br>
> that the default settings are the most common ones.<br>
<br>
</div>Not necessarily so. These parameters depend on your data quality.<br>
<div><br>
> - Why is 5 default value for the max threshold limits? I read explanation of<br>
> the function jointprob() where it says that the threshold is expressed in<br>
> standard deviation of the mean.<br>
<br>
</div>Start with 5 and see the results. If it catches too many epochs, then<br>
increase the value. I would use 8-10.<br>
<div><br>
> - What would be the easiest way to calculate the standard deviation of the<br>
> mean of my dataset and would that result be the threshold that is<br>
> appropriate to my dataset?<br>
<br>
</div>Adjust them so that the sum of epochs suggested by your rejection<br>
methods ends up with around 10 % of the data.<br>
<div><br>
> - Are there situation when it is better to use Kurtosis rather than the<br>
> probability measure and the other way around?<br>
<br>
</div>You should see what type of artifacts are picked up by what methods.<br>
Generally, kurtosis is too sensitive to outliers. The probability<br>
measure sometimes picks up large alpha. Both have problems, so don't<br>
completely rely on them. Use them mildly.<br>
<br>
I would recommend that you simply threshold the data by amplitude<br>
first (+/- 150-200 microvolt, for example) to exclude undoubtedly<br>
wrong epochs due to loose channel etc (select up to 1% of data- but be<br>
careful not to catch eye blinks), then apply probability method<br>
(select up to 3-5% of data). You may think the data is not clean yet,<br>
but apply ICA anyway, and do rejections on IC activities to select<br>
another up to 5% of epochs if you want.<br>
<br>
See also Delorme et al. 2007 NeuroImage for epoch rejection using<br>
EEGLAB tools. This is an excellent guide for you.<br>
<br>
My general impression is that people spend too much time on data<br>
cleaning (especially psychologists; I've seen this because I'm a<br>
psychologist). ICA decomposition is in many cases more robust than you<br>
think. If you want to prove it, try ICA with rejection rate of 5%,<br>
10%, and 15%. I'll bet you don't see much (or even any) difference in<br>
IC topos and spectra as long as you recorded the data in an ordinary<br>
laboratory environment. So don't be too nervous.<br>
<br>
Makoto<br>
<br>
2013/2/9 ida miokovic <<a href="mailto:ida.miokovic@gmail.com" target="_blank">ida.miokovic@gmail.com</a>>:<br>
<div><div>> Dear eeglab list,<br>
><br>
> after performing some analysis on the eeg dataset I have, I noticed that in<br>
> "Bad channels rejection" step I used Kurtosis measure, normalize measure<br>
> checked and the max threshold limits remained set on 5 (by the default). At<br>
> the time of performing this step, I didn't pay much attention to it assuming<br>
> that the default settings are the most common ones. Now, when explaining to<br>
> the detail each step of my analysis, I'm stuck here.<br>
><br>
> - Why is 5 default value for the max threshold limits? I read explanation of<br>
> the function jointprob() where it says that the threshold is expressed in<br>
> standard deviation of the mean.<br>
><br>
> - What would be the easiest way to calculate the standard deviation of the<br>
> mean of my dataset and would that result be the threshold that is<br>
> appropriate to my dataset?<br>
><br>
> - Are there situation when it is better to use Kurtosis rather than the<br>
> probability measure and the other way around?<br>
><br>
> Thank you very much for your help and I apologize in advance if you find<br>
> these questions too simple...<br>
><br>
> Ida<br>
><br>
><br>
><br>
><br>
</div></div>> _______________________________________________<br>
> Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" target="_blank">http://sccn.ucsd.edu/eeglab/eeglabmail.html</a><br>
> To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu" target="_blank">eeglablist-unsubscribe@sccn.ucsd.edu</a><br>
> For digest mode, send an email with the subject "set digest mime" to<br>
> <a href="mailto:eeglablist-request@sccn.ucsd.edu" target="_blank">eeglablist-request@sccn.ucsd.edu</a><br>
<span><font color="#888888"><br>
<br>
<br>
--<br>
Makoto Miyakoshi<br>
JSPS Postdoctral Fellow for Research Abroad<br>
Swartz Center for Computational Neuroscience<br>
Institute for Neural Computation, University of California San Diego<br>
</font></span></blockquote></div><br></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Makoto Miyakoshi<br>JSPS Postdoctral Fellow for Research Abroad<br>Swartz Center for Computational Neuroscience<br>Institute for Neural Computation, University of California San Diego<br>
</div></div></div>
</blockquote></div><br></div></div></div>
<br>_______________________________________________<br>
Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" target="_blank">http://sccn.ucsd.edu/eeglab/eeglabmail.html</a><br>
To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu">eeglablist-unsubscribe@sccn.ucsd.edu</a><br>
For digest mode, send an email with the subject "set digest mime" to <a href="mailto:eeglablist-request@sccn.ucsd.edu">eeglablist-request@sccn.ucsd.edu</a><br></blockquote></div><br><br clear="all"><div><br></div>
-- <br>Makoto Miyakoshi<br>JSPS Postdoctral Fellow for Research Abroad<br>Swartz Center for Computational Neuroscience<br>Institute for Neural Computation, University of California San Diego<br>
</div>