<html><head><base href="x-msg://26/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Kaelasha,<div><br></div><div>Sorry for being unclear. You can do something like:</div><div><br></div><div>stat = ft_sourcestatistics(cfg, data1, data2, data3, data4, ....), or stat = ft_sourcestatistics(cfg, data{:}); where data is a cell-array of structures (1 cell for each participant/condition).</div><div><br></div><div>Best,</div><div>Jan-Mathijs</div><div><br></div><div><br></div><div><br></div><div><br><div><div>On Jan 15, 2014, at 9:14 AM, Kaelasha Tyler wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div fpstyle="1" ocsi="0" style="word-wrap: break-word; "><div style="direction: ltr; font-family: Tahoma; color: rgb(0, 0, 0); font-size: 10pt; ">Hi Jan-Mathijs,<div><br></div><div>Thanks for this response.</div><div>I still have a question though.</div><div>You mentioned that it is not necessary to use ft_sourcegrandaverage to perform statistical analysis with source space ERFs across multiple participants. However, what you appeared to suggest in your email, does appear to still use a grand average, e.g. you wrote:</div><div><br></div><div><div style="font-family: 'Times New Roman'; "><font size="2">>you can do something like this</font></div><div style="font-family: 'Times New Roman'; "><font size="2"><br></font></div><div style="font-family: 'Times New Roman'; "><font size="2">>cfg = your cfg to ft_sourcestatistics</font></div><div style="font-family: 'Times New Roman'; "><font size="2">>stat = ft_sourcestatistics(cfg,<span class="Apple-converted-space"> </span><font color="#ff0000">grandavg</font>{:});</font></div></div><div><br></div><div>Having played around with it a bit more, I am still unclear how to use multiple inputs (e.g., multiple subjects source data) when using ft_sourcestatistics. I had thought that ft_sourcegrandavarge was a necessity. </div><div>Can you make this a bit clearer?</div><div><br></div><div>Also, I did go back and use cfg.fixedori='yes' when calling my first ft_srouceanalysis and moved also my source.avg.mom data into source.avg.pow as you suggested, but this still leaves me with the question above- how to use multiple subjects source data in <span style="font-size: 10pt; ">ft_sourcestatistics?</span></div><div><span style="font-size: 10pt; "><br></span></div><div><span style="font-size: 10pt; ">Once again, any help from anyone would be much </span>appreciated!</div><div><br></div><div>Kaelasha</div><div><br><div style="font-family: 'Times New Roman'; color: rgb(0, 0, 0); font-size: 16px; "><hr tabindex="-1"><div id="divRpF615831" style="direction: ltr; "><font face="Tahoma" size="2" color="#000000"><b>From:</b><span class="Apple-converted-space"> </span><a href="mailto:fieldtrip-bounces@science.ru.nl">fieldtrip-bounces@science.ru.nl</a><span class="Apple-converted-space"> </span>[fieldtrip-bounces@science.ru.nl] on behalf of jan-mathijs schoffelen [jan.schoffelen@donders.ru.nl]<br><b>Sent:</b><span class="Apple-converted-space"> </span>Tuesday, 14 January 2014 5:52 PM<br><b>To:</b><span class="Apple-converted-space"> </span>FieldTrip discussion list<br><b>Subject:</b><span class="Apple-converted-space"> </span>Re: [FieldTrip] ft_sourcestatistics and sourcegrandaverage time series<br></font><br></div><div></div><div>Hi Kaelasha,<div><br></div><div>You actually don't need to use ft_sourcegrandaverage if your goal is to do statistics. Ft_sourcestatistics in principle knows how to deal with multiple inputs.</div><div>Thus,</div><div>rather than doing</div><div><br></div><div>cfg = [];</div><div>cfg.keepindividual = 'yes';</div><div>grandavg = ft_sourcegrandaverage(cfg, subjectdata{:});</div><div><br></div><div>you can do something like this</div><div><br></div><div>cfg = your cfg to ft_sourcestatistics</div><div>stat = ft_sourcestatistics(cfg, grandavg{:});</div><div><br></div><div>Now, the question boils down to 'how to fool ft_sourcestatistics to swallow my data?'.</div><div><br></div><div>The following should more or less work (but requires some manual labour):</div><div><br></div><div>The time courses at the voxel level are present in source.avg.mom. These are most likely 3xN, 3 dipole orientations times N time points. In order to reduce this, one can project the orientation along the first pca-axis. This can be achieved by a call to ft_sourcedescriptives with cfg.projectmom='yes', or by calling ft_sourceanalysis in the first place with cfg.fixedori = 'yes'. </div><div>Then, you could do something like:</div><div><br></div><div>pow = zeros(size(source.pos,1),length(source.time);</div><div>pow(source.inside,:) = cat(1,source.avg.mom{source.inside});</div><div>source.avg.pow = pow;</div><div><br></div><div>Just to be sure, add a time-axis to the source structure, i.e. source.time = tlck.time (tlck being the data structure used to create the lcmv-output).</div><div><br></div><div>I think this should bring you close to doing statistics.</div><div><br></div><div>Best,</div><div>Jan-Mathijs</div><div><br></div><div><br></div><div><br><div><div>On Jan 14, 2014, at 7:19 AM, Kaelasha Tyler wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; "><div><div style="direction: ltr; font-family: Tahoma; color: rgb(0, 0, 0); font-size: 10pt; ">Hi all,<div><br></div><div>Reading through the discussion list, I see others have also had some issues with creating grand averaged source space time series (ERFs) and subsequent statistical analysis,  but I can't see any solutions....</div><div><br></div><div>Questions:</div><div>How can I create time series (ERFs) for grand averaged source space data?</div><div>And, how can I do cluster analysis<span style="font-size: 10pt; "> on these (yet to be created) grand averaged source  space ERFs?</span></div><div><br></div><div><br></div><div>I have used ft_SOURCEANALYSIS with method 'lcmv' for individual participants to generate source space time series, in data.avg.mom.</div><div><br></div><div>Subsequently I used ft_sourcegrandaverage to combine source space data across subjects. </div><div><br></div><div>However my grand averaged source data.avg only contains 'pow' and no 'mom'. Eg, no time series for the grand averaged source space data. </div><div><br></div><div>As such, I can not do cluster analysis on grand averaged ERFs in source space.</div><div><br></div><div>It appears that ft_sourcestatistics only works with <font size="2">parameters that have not more than one value per </font>grid point<font size="2"> (e.g. pow, nai etc) and is unable to work with ERF time series? Is this true?</font></div><div><span style="font-family: Courier; font-size: 10px; "><br></span></div><div>Can any one help with this?</div><div><br></div><div>Much obliged.</div><div>Kaelasha</div><div><br></div><div><br></div><div><br></div><div><span style="font-family: Courier; font-size: 10px; "><br></span></div><div><span style="font-family: Courier; font-size: 10px; "><br></span></div></div>_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></div></span></blockquote></div><br><div><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; "><div style="word-wrap: break-word; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; "><div style="word-wrap: break-word; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; "><div style="word-wrap: break-word; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; "><div style="word-wrap: break-word; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; "><div style="word-wrap: break-word; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; "><div style="word-wrap: break-word; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; "><div style="word-wrap: break-word; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; "><div>Jan-Mathijs Schoffelen, MD PhD </div><div><br></div><div>Donders Institute for Brain, Cognition and Behaviour, <br>Centre for Cognitive Neuroimaging,<br>Radboud University Nijmegen, The Netherlands</div><div><br></div><div>Max Planck Institute for Psycholinguistics,</div><div>Nijmegen, The Netherlands</div><div><br></div><div><a href="mailto:J.Schoffelen@donders.ru.nl" target="_blank">J.Schoffelen@donders.ru.nl</a></div><div>Telephone: +31-24-3614793</div><div><br></div><div><a href="http://www.hettaligebrein.nl" target="_blank">http://www.hettaligebrein.nl</a></div></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></span></div><br></div></div></div></div></div>_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></div></span></blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Jan-Mathijs Schoffelen, MD PhD </div><div><br></div><div>Donders Institute for Brain, Cognition and Behaviour, <br>Centre for Cognitive Neuroimaging,<br>Radboud University Nijmegen, The Netherlands</div><div><br></div><div>Max Planck Institute for Psycholinguistics,</div><div>Nijmegen, The Netherlands</div><div><br></div><div><a href="mailto:J.Schoffelen@donders.ru.nl">J.Schoffelen@donders.ru.nl</a></div><div>Telephone: +31-24-3614793</div><div><br></div><div><a href="http://www.hettaligebrein.nl">http://www.hettaligebrein.nl</a></div></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></span>
</div>
<br></div></body></html>