<div dir="ltr">Thanks for that reference, Tim, and the suggestions.<div><br></div><div>Since I'm only interested in within-condition means of SIFT metrics compared across conditions, I made SIFT's time-windows non-overlapping. So at least that very blatant source of autocorrelation is avoidable. Of course there remains the source from the EEG itself.</div><div><br></div><div>Skipping some data by leaving gaps in the windows with sizes dictated by the autocorrelation function to get to quasi-independence could improve upon the adjacent non-overlapping window scheme. </div><div><br></div><div>Even though SIFT's connectivity metrics won't be Gaussian, if we have enough (modulo quasi-ind) and are just interested in their sample mean, the CLT should still apply. Good advice on the log transform though. Anything making it more Gaussian should help.</div><div><br></div><div>Thanks Tim!</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 25, 2016 at 5:19 PM, Tim Mullen <span dir="ltr"><<a href="mailto:mullen.tim@gmail.com" target="_blank">mullen.tim@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<u></u>
<div style="word-wrap:normal;word-break:break-word">
<table lang="container" dir="ltr" border="0" cellpadding="0" cellspacing="0" valign="top" style="width:100%;margin-top:6px">
<tbody><tr>
<td valign="top" style="line-height:1.31;color:#222;font-family:arial,sans-serif">
<div style="max-width:590px">PS: in Matlab 2016 you can just use the autocorr() function for an autocorrelation plot with confidence intervals. </div><div style="max-width:590px"><br></div><div style="max-width:590px"><div style="max-width:590px"><font face="Arial, sans-serif" color="#222222"><br></font></div></div>
</td>
</tr>
</tbody></table><div><div class="h5">
<div style="max-width:590px">
<div style="max-width:590px">
<p><br></p>
<div class="gmail_extra">
<p><br></p>
<div class="gmail_quote">
On Thu, Aug 25, 2016 5:13 PM, Tim Mullen <span dir="ltr"> <a href="mailto:mullen.tim@gmail.com" target="_blank">mullen.tim@gmail.com</a></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<u></u>
<table lang="container" dir="ltr" border="0" cellpadding="0" cellspacing="0" valign="top" style="width:100%;margin-top:6px">
<tbody><tr>
<td valign="top" style="line-height:1.31;color:#222;font-family:arial,sans-serif">
<div style="max-width:590px">Ok. Yes, as you've surmised, the key trickiness in this sort of statistical problem is that you need to consider the autocorrelation in each time-series (and they are definitely autocorrelated here, since the causal estimates are obtained from a sliding window). Probably the worst thing you can do is perform a standard unpaired t-test, which has hugely inflated Type I error rate if samples are significantly autocorrelated.</div><div style="max-width:590px"><br></div><div style="max-width:590px">Perhaps you could try a method like this: </div><div>
<div style="min-height:4px;font-size:4px"><br></div>
<table cellpadding="0" cellspacing="0" style="border:1px solid #f5ffff;border-radius:4px;width:100%;max-width:578px">
<tbody><tr style="border:1px solid #d5ecff;display:block;border-radius:3px">
<td style="display:block;padding:8px;border-radius:2px;border:1px solid #99b0e1;font-size:0;vertical-align:top;background-color:white">
<table width="100%" border="0" cellpadding="0" cellspacing="0" valign="top" style="border-collapse:separate;text-align:left">
<tbody><tr>
<td rowspan="2" valign="top" style="width:134px">
<table width="100%" border="0" cellpadding="0" cellspacing="0" valign="top" style="border-collapse:separate">
<tbody><tr>
<td valign="top">
<a href="http://www.ncbi.nlm.nih.gov/pubmed/26011524" style="display:block" target="_blank"><img src="https://res.cloudinary.com/mixmax/image/fetch/w_800,h_600,c_fill,q_90,fl_progressive,g_faces:center/http%3A%2F%2Fwww.ncbi.nlm.nih.gov%2Fcoreutils%2Fimg%2Fpubmed256blue.png" width="120" style="display:block;width:120px;vertical-align:top" alt="Preview image"></a>
</td>
</tr>
</tbody></table>
</td>
<td rowspan="" valign="top" style="font-size:13px;width:px">
<table width="100%" border="0" cellpadding="0" cellspacing="0" valign="top" style="border-collapse:separate;font-size:13px">
<tbody><tr>
<td valign="top">
<table cellpadding="0" cellspacing="0" valign="top" style="border-collapse:collapse">
<tbody><tr>
<td colspan="2" valign="top" style="min-width:100%;padding-bottom:2px;font-size:16px;line-height:22px;font-weight:600;font-family:'proxima-nova','Avenir Next','Segoe UI','Calibri','Helvetica Neue',Helvetica,Arial,sans-serif">
<a href="http://www.ncbi.nlm.nih.gov/pubmed/26011524" style="text-decoration:none;display:block;color:#333;border:none" target="_blank">
Performing T-tests to Compare Autocorrelated Time Series Data Collected from Direct-Reading Instruments.
</a>
</td>
</tr>
<tr>
<td colspan="2" valign="top" style="min-width:100%;padding-bottom:4px;font-size:13px;line-height:17px;font-family:'Segoe UI','Helvetica Neue',Helvetica,'Calibri',Arial,sans-serif">
<a href="http://www.ncbi.nlm.nih.gov/pubmed/26011524" style="text-decoration:none;display:block;color:#333;border:none" target="_blank">
J Occup Environ Hyg. 2015;12(11):743-52. doi: 10.1080/15459624.2015.1044603.
</a>
</td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
</td>
</tr><tr>
<td valign="bottom">
<table width="100%" border="0" cellpadding="0" cellspacing="0" valign="top" style="border-collapse:separate">
<tbody><tr>
<td valign="bottom" style="line-height:11px;font-family:'proxima-nova','Avenir Next','Segoe UI','Calibri','Helvetica Neue',Helvetica,Arial,sans-serif">
<a style="color:#aab;display:block;font-size:11px;margin:0;letter-spacing:1px;padding-left:1px;text-decoration:none;text-transform:uppercase" href="http://www.ncbi.nlm.nih.gov/pubmed/26011524" target="_blank">ncbi.nlm.nih.gov</a>
</td>
<td align="right" valign="bottom">
<a href="https://mixmax.com/r/T5KoXCt3bjAk6cadS" style="display:block;vertical-align:top;font-size:0" target="_blank">
<img src="https://emailapps.mixmax.com/img/badge_mixmax.png" align="top" height="20" style="display:block" alt="Mixmax" border="0">
</a>
</td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table></td></tr>
</tbody></table>
<div style="min-height:4px;font-size:4px"><br></div>
</div><div style="max-width:590px"><br></div><div style="max-width:590px">Alternately, one possibility might be to compute the autocorrelation function for each time-series and if it decays to non-significant amplitude after K lags, then you could just select every K+1th sample for subsequent analysis. The serial correlation should be minimal at that point (you could run a Durbin-Watson test to confirm). <a href="http://www.itl.nist.gov/div898/handbook/eda/section3/autocopl.htm" target="_blank">Here is an example</a> of how to use an autocorrelation plot for this. One potential issue here (there's always one) is that the analytic confidence bounds for the null hypothesis of zero autocorrelation generally rely on a Gaussianity assumption on the data. The granger-causal estimates are definitely not Gaussian (probably closer to gamma-distributed). You could try log-transforming them to render more Gaussian -- it's a monotonic transform so it won't affect the statistics for differences in means.</div><div style="max-width:590px"><br></div><div style="max-width:590px">There are other more complex approaches involving fitting ARMA models (and probably some more simple ones I'm not considering at the moment).</div><div style="max-width:590px"><br></div><div style="max-width:590px">Tim</div><div style="max-width:590px"><div style="max-width:590px"><font face="Arial, sans-serif" color="#222222"><br></font></div></div>
</td>
</tr>
</tbody></table>
<div style="max-width:590px">
<div style="max-width:590px">
<p><br></p>
<div>
<p><br></p>
<div>
On Tue, Aug 23, 2016 11:38 PM, Winslow Strong <span dir="ltr"> <a href="mailto:winslow.strong@gmail.com" target="_blank">winslow.strong@gmail.com</a></span>
wrote:<br>
<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<u></u>
<div dir="ltr">Only in a difference in means over the entire condition.</div><div><br><div>On Tue, Aug 23, 2016 at 11:00 PM, Tim Mullen <span dir="ltr"><<a href="mailto:mullen.tim@gmail.com" target="_blank">mullen.tim@gmail.com</a>></span> wrote:<br><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Yes, skipping one or more trials may at least mitigate some of the autocorrelation effects. Are you only interested in whether there is a difference in means over the whole condition, or whether there are differences at specific points in time?<div><div><div><br><div>On Tue, Aug 23, 2016 at 4:17 PM, Winslow Strong <span dir="ltr"><<a href="mailto:winslow.strong@gmail.com" target="_blank">winslow.strong@gmail.com</a>></span> wrote:<br><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Tim,<div><br></div><div>Yes I was searching for some approximate test stats and p-vals generated by creating pseudotrials within each trial. I'll try this out. I'm thinking it might be wise to leave a gap between the pseudo trials (i.e. not make them contiguous EEG segments) to make them closer to independent. Leaving out every-other pseudotrial might be a reasonable tradeoff. One could get 2 test stats or just 2 sample variances this way: one from the even pseudotrials and one from the odds. </div><div><br></div><div>This is a bit hacky though, and I wonder if there are canonical methods to deal with the lack of independence. </div></div><div><div><div><br><div>On Mon, Aug 22, 2016 at 12:59 PM, Tim Mullen <span dir="ltr"><<a href="mailto:mullen.tim@gmail.com" target="_blank">mullen.tim@gmail.com</a>></span> wrote:<br><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Winslow, Makoto,</p>
<p dir="ltr">As a statistical principle, bootstrapping can only be used when you have multiple independent and identically distributed (i.i.d) observations available. The observations are resampled with replacement from the original set to construct an empirical probability distribution. </p>
<p dir="ltr">It is not possible to use bootstrapping to test for statistical differences between only two observations (i.e. two trials). In general, with any test, your statistical power will be extremely low if you have only one observation per condition. </p>
<p dir="ltr">You can try to mitigate this by segmenting your long continuous trials into short 'pseudo-trials' and then testing for differences in the pseudo-trial between conditions. Make sure that you average your causal measure over time within each trial before computing your stats. One concern is that the pseudotrials may be far from i.i.d within a condition, so if using bootstrap, your bootstrap distribution may not converge to the true distribution of the estimator and your stats will be biased. </p>
<p dir="ltr">Depending on your specific null hypothesis and protocol, however, there may be alternative parametric and nonparametric tests you can apply.</p>
<p dir="ltr">Otherwise try to collect data for more subjects (then you simply bootstrap across subjects e.g. using statcond with SIFT matrices) or more trials (run your experiment more than once per condition).</p><span><font color="#888888">
<p dir="ltr">Tim<br>
</p></font></span><div><div>
<div><br><div>On Aug 18, 2016 11:09 AM, "Makoto Miyakoshi" <<a href="mailto:mmiyakoshi@ucsd.edu" target="_blank">mmiyakoshi@ucsd.edu</a>> wrote:<br type="attribution"><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Dear Winslow,<div><br></div><div>Yes, unfortunately the bootstrap seems to be designed for across trials.</div><div><br></div><div>Makoto</div><div><br><div>On Sat, Aug 13, 2016 at 4:57 PM, Winslow Strong <span dir="ltr"><<a href="mailto:winslow.strong@gmail.com" target="_blank">winslow.strong@gmail.com</a>></span> wrote:<br><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I'd like to use a resampling technique (e.g. bootstrap) to get p-values and test stats for SIFT connectivity metrics for 1 subject across n conditions. <div><br></div><div>This is a steady-state condition study, hence there's only 1 trial per condition. I'm trying to analyze whether certain connectivity metrics (i.e. their averages over a condition) are statistically significantly different across the conditions. I was under the impression I could use SIFT's surrogate distribution generator to obtain the surrogate distribution for these calculations, but when I run that from the GUI for bootstrap, I get the error:</div><div><br></div><div>"Unable to compute bootstrap distributions for a single trial"</div><div><br></div><div>Is this surrogate function only designed to do boostrapping over trials? Or is there a way to do it over windows within a condition?</div></div>
<br>______________________________<wbr>_________________<br>
Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" rel="noreferrer" target="_blank">http://sccn.ucsd.edu/eeglab/ee<wbr>glabmail.html</a><br>
To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu" target="_blank">eeglablist-unsubscribe@sccn.uc<wbr>sd.edu</a><br>
For digest mode, send an email with the subject "set digest mime" to <a href="mailto:eeglablist-request@sccn.ucsd.edu" target="_blank">eeglablist-request@sccn.ucsd.e<wbr>du</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div data-smartmail="gmail_signature"><div dir="ltr">Makoto Miyakoshi<br>Swartz Center for Computational Neuroscience<br>Institute for Neural Computation, University of California San Diego<br></div></div>
</div></div>
<br>______________________________<wbr>_________________<br>
Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" rel="noreferrer" target="_blank">http://sccn.ucsd.edu/eeglab/ee<wbr>glabmail.html</a><br>
To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu" target="_blank">eeglablist-unsubscribe@sccn.uc<wbr>sd.edu</a><br>
For digest mode, send an email with the subject "set digest mime" to <a href="mailto:eeglablist-request@sccn.ucsd.edu" target="_blank">eeglablist-request@sccn.ucsd.e<wbr>du</a><br></blockquote></div></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div></div></div></div>
</blockquote></div><br></div>
</blockquote>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div></div></div>
</blockquote></div><br></div>