[FieldTrip] Averaging on a random sample

Caspar, Emilie e.caspar at ucl.ac.uk
Fri Nov 21 10:09:27 CET 2014


Dear Fieldtrippers,

I have a sample of 350 trials for one condition, but for statistical analysis reasons I would like to split randomly this sample in two and average these two parts.

so, I used the "randsample" matlab function which seems to work very well and then I averaged this selected sample:

        randomhalf = randsample(cleandata.trial, 175);
        avgFCMiddleRing = ft_timelockanalysis(cfg, randomhalf);


However, I have the following error message :

Error using ft_checkdata (line 366)
This function requires raw or comp data as input.

Error in ft_timelockanalysis (line 105)
data = ft_checkdata(data, 'datatype', {'raw', 'comp'}, 'feedback', 'yes', 'hassampleinfo', 'yes');

Does anyone have a solution to fix the problem?

Thank you very much!

Emilie

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20141121/6c050e4c/attachment-0001.html>


More information about the fieldtrip mailing list