<div dir="ltr">Hi Arjen,<div><br></div><div>Thank you for the suggestion. I tried it, but in this case <span style="font-size:12.8px">ft_timelockgrandaverage just spits out NaN for the channels where some participant(s) had NaNs. This is to be expected since that's how Matlab deals with NaNs by default. </span><span style="font-size:12.8px">So basically I need to find some way to do averaging within the filedtrip datastructure that would be equivalent to matlab's 'omitnan' option.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"><br>Arnold</span></div><div><span style="font-size:12.8px"><br></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 4, 2017 at 5:20 PM, Arjen Stolk <span dir="ltr"><<a href="mailto:a.stolk8@gmail.com" target="_blank">a.stolk8@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Arnold,<div><br></div><div>There's a cfg.method = 'nan' option in ft_channelrepair, which creates NaN data for specified channels. As a result, these channels are still considered in the group-level statistics, provided other subjects have data for the same channels. However, I don't know whether timelockgrandaverage can yet deal with these NaN channels too.</div><div><br></div><div>Best,</div><div>Arjen</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Fri, Aug 4, 2017 at 7:45 AM, Arnold Kochari <span dir="ltr"><<a href="mailto:a.kochari@uva.nl" target="_blank">a.kochari@uva.nl</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Dear FieldTrip community,<div><br></div><div>I have a question about what seems to be an old problem with no solution posted yet. </div><div><br></div><div>I have deleted bad channels in some participants during preprocessing. Now I would like to compute grand average ERPs using ft_timelockgrandaverage. However, if a channel has been deleted in at least one participant, the mean for it does not get calculated. What I would like to see is just that the average is calculated among the remaining participants.</div><div><br></div><div>I understand that there might be some strong arguments for the absence of this functionality. I also know about the possibility to interpolate the deleted channels using channelrepair, but I do not really agree with it.</div><div><br></div><div>Is there any way to calculate grand averages the way I would like to do it? The only solution that I can think of right now is exporting the data, making the calculation in R and then importing the averages it again, but that would require a lot f time.</div><div><br></div><div><br></div><div>Kind regards,</div><div>Arnold Kochari</div><div>PhD candidate, Institute for Logic, Language and Computation, University of Amsterdam</div></div>
<br></div></div>______________________________<wbr>_________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/<wbr>mailman/listinfo/fieldtrip</a><br></blockquote></div><br></div>
<br>______________________________<wbr>_________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/<wbr>mailman/listinfo/fieldtrip</a><br></blockquote></div><br></div>