<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Hi Paul,
<div class=""><br class="">
</div>
<div class="">Given that the original error message you posted occurs in ft_timelockstatistics (at a point in the code where the lower-level ft_statfun_actvsblT has not yet been reached) it’s probably useful if you first investigate what the data looks like,
 either at that point in the code (using the matlab debugger), or before you call ft_timelockstatistics.</div>
<div class=""><br class="">
</div>
<div class="">Your overarching question however seems to be ‘how to statistically evaluate an ERP  when there’s only a single condition?’</div>
<div class=""><br class="">
</div>
<div class="">My question back to you would be: what’s the null hypothesis you aim to address with that question? I guess it would be something along the lines of ’the null hypothesis is that the averaged (across observations) signal before and after the event-of-interest
 is the same’. Typically it’s rather trivial to reject such a null hypothesis</div>
<div class=""><br class="">
</div>
<div class="">As a follow up on your specific question related to ft_statfun_actvsblT: I found an old bug report here: <a href="http://bugzilla.fieldtriptoolbox.org/show_bug.cgi?id=3471" class="">http://bugzilla.fieldtriptoolbox.org/show_bug.cgi?id=3471</a>.
 This means that indeed what you mention has been noticed before (i.e. an inconsistency between the function’s documentation, and its actual functional behaviour), but not yet solved. </div>
<div class=""><br class="">
</div>
<div class="">Yet regardless, by reading the code, I wonder why anybody would use this function to begin with (for ERPs). The reason for this is that line 109 averages the data across time. Thus, the result of the comparison will highly depend on the window
 of temporal integration. For instance, if there’s an nice and symmetric biphasic ERP in the data, the average across time will be zero, which, if your ‘baseline’ data also has a nice average of 0, will not result in a rejection of the null hypothesis.</div>
<div class=""><br class="">
</div>
<div class="">Best wishes,</div>
<div class=""><br class="">
</div>
<div class="">Jan-Mathijs</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 4 Mar 2021, at 17:30, Paul Dhami <<a href="mailto:pdhami06@gmail.com" class="">pdhami06@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">Dear Jan-Mathijs
<div class=""><br class="">
</div>
<div class="">Thank you for your response! It is greatly appreciated.</div>
<div class=""><br class="">
</div>
<div class="">1. Admittedly, I am hoping to use FieldTrip to conduct some states on single channel data. Accordingly, I created a "hacked" structure following what should be in a time lock data type using this page:
<a href="https://www.fieldtriptoolbox.org/reference/ft_datatype_timelock/" class="">
https://www.fieldtriptoolbox.org/reference/ft_datatype_timelock/</a></div>
<div class=""><br class="">
</div>
<div class="">I believe I have copied it appropriately, so I am leaning towards a mistake with regards to my design matrix.</div>
<div class=""><br class="">
</div>
<div class="">2. I was unsure of this, but following multiple FieldTrip threads, it seems as though some people have used 'actvsblT' for ERP data. My specific experiment contains a single stimuli, and I simply want to see if the stimuli modulates the neural
 activity in any significant manner (is post stimuli data different from the baseline data). </div>
<div class=""><br class="">
</div>
<div class="">Reading the instructions for this function: <a href="https://www.fieldtriptoolbox.org/reference/ft_statfun_actvsblT/" class="">https://www.fieldtriptoolbox.org/reference/ft_statfun_actvsblT/</a></div>
<div class=""><br class="">
</div>
<div class="">It reads as though it could be used on TimeLocked data (after commenting out the lines you mentioned which restrict it to time-frequency representation).</div>
<div class=""><br class="">
</div>
<div class="">I would love to know your thoughts on what would be the best way to statistically compare baseline data versus post stimuli data. This is admittedly my first time working with such an experimental setup.</div>
<div class=""><br class="">
</div>
<div class="">Best wishes,</div>
<div class="">Paul</div>
</div>
_______________________________________________<br class="">
fieldtrip mailing list<br class="">
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br class="">
https://doi.org/10.1371/journal.pcbi.1002202<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>