<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hi Tyler,<div><br></div><div>It’s impossible to increase the rank of your data. The rank of your data will be limited by the number of independent channels in the data. I don’t know whether you have used a maxfilter or not, and whether you were doing the source reconstruction on the gradiometers alone, or on all channels etc. Irrespective of this, if you are ‘upsampling’ the number of ‘channels’ artificially by concatenating across reconstructed dipoles ---(aggravating the issue by appending the x/y/z directions per dipole, and even more aggravating it by using rank-reduced leadfields (but note that without rank reduced leadfields it will be problematic: not only due to the dimensionality, but also because of the fact that in MEG the most ‘radial’ component picks up a lot of noise, thus disturbing the quality of the estimates))—- the rank in the reconstructed data will never be more than the number of channels.</div><div>Thus, if you want to have a meaningful multivariate decomposition, the ‘multi’ in multivariate should be less than the number of channels (where in addition I assume that you have recorded a sufficient amount of data in order for a somewhat robust estimation of the AR-coefficients). Would it make sense to start off with the computation of pairwise models? I.e. estimating the AR-model for each dipole pair?</div><div><br></div><div>Best,</div><div>Jan-Mathijs</div><div><br></div><div><br><div><div>On Jun 4, 2014, at 9:53 AM, Tyler Grummett <<a href="mailto:tyler.grummett@flinders.edu.au">tyler.grummett@flinders.edu.au</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hey Jorn,<br><br>I was just checking to see if I was calculating the beamformer correctly. <br><br>Long story short, I worked out X Y Z coordinates for brain regions using the AAL atlas, gave that to the leadfield and beamformer to only give me 116.<br>What this does it doesnt allow me to interpolate the data anymore (whereas previously I had approx 4000 because I was using the same Xgrid, Ygrid<br>and Zgrid as the atlas).<br><br>I was trying to increase my rank (or decrease rank deficiency by changing my code).<br><br>However, no matter what I have tried thus far, nothing has helped.<br><br>Tyler.<br><br>*************************<br><br>Tyler Grummett ( BBSc, BSc(Hons I))<br>PhD Candidate<br>Brain Signals Laboratory<br>Flinders University<br>Rm 5A301<br>Ext 66124<br><br>________________________________________<br>From: <a href="mailto:fieldtrip-bounces@science.ru.nl">fieldtrip-bounces@science.ru.nl</a> <<a href="mailto:fieldtrip-bounces@science.ru.nl">fieldtrip-bounces@science.ru.nl</a>> on behalf of "Jörn M. Horschig" <<a href="mailto:jm.horschig@donders.ru.nl">jm.horschig@donders.ru.nl</a>><br>Sent: Wednesday, 4 June 2014 5:12 PM<br>To: FieldTrip discussion list<br>Subject: Re: [FieldTrip] ft_mvaranalysis<br><br>Hi Tyler,<br><br>I thought you are talking about mvaranalysis - why is the code you've<br>pasted about leadfields and lcmv beamforming?<br><br>Best,<br>Jörn<br><br>On 6/4/2014 3:15 AM, Tyler Grummett wrote:<br><blockquote type="cite">Jorn,<br><br>There is an additional issue of interpolating the data and then plotting it with ft_sourceplot.<br><br>I have hit a wall of issues haha<br><br>Tyler<br><br>*************************<br><br>Tyler Grummett ( BBSc, BSc(Hons I))<br>PhD Candidate<br>Brain Signals Laboratory<br>Flinders University<br>Rm 5A301<br>Ext 66124<br><br>________________________________________<br>From: <a href="mailto:fieldtrip-bounces@science.ru.nl">fieldtrip-bounces@science.ru.nl</a> <<a href="mailto:fieldtrip-bounces@science.ru.nl">fieldtrip-bounces@science.ru.nl</a>> on behalf of Tyler Grummett <<a href="mailto:tyler.grummett@flinders.edu.au">tyler.grummett@flinders.edu.au</a>><br>Sent: Wednesday, 4 June 2014 10:11 AM<br>To: FieldTrip discussion list<br>Subject: Re: [FieldTrip] ft_mvaranalysis<br><br>Hey Jorn,<br><br>You were right, it was rank reduced. I tried changing that option that is used if ft_prepare_leadfield ( 'reducerank' = 'no'), but it didnt seem to work.<br><br>My code is as follows: (I used an atlas to get the grid coordinates)<br><br>             % compute lead field ( apparently source analysis computes<br>             % lead field anyway<br>             cfg                 = [];<br>             cfg.elec            = timelock.elec;<br>             cfg.vol             = vol;<br>             cfg.grid.unit       = 'mm';<br>             cfg.dim = atlas_grid.dim;<br>             cfg.pos = pos;<br>             cfg.reducerank = 'no'; % 3 for EEG, 2 for MEG<br>             cfg.backproject = 'yes';<br>             cfg.normalize = 'yes'; % if you are not contrasting the activity of interest again another condition or baseline time-window<br>             grid = ft_prepare_leadfield( cfg);<br><br>             % Source Analysis: without contrasting condition<br>             cfg = [];<br>             cfg.channel = 'EEG';<br>             cfg.method = 'lcmv';<br>             cfg.grid = grid;<br>             cfg.vol = vol;<br>             cfg.keepfilter = 'yes';<br>             source = ft_sourceanalysis( cfg, timelock);<br><br>Previously I had used the x, y and z grid from the atlas, but I till had a reduced rank.<br><br>Any suggestions?<br><br>Tyler<br><br>*************************<br><br>Tyler Grummett ( BBSc, BSc(Hons I))<br>PhD Candidate<br>Brain Signals Laboratory<br>Flinders University<br>Rm 5A301<br>Ext 66124<br><br>________________________________________<br>From: <a href="mailto:fieldtrip-bounces@science.ru.nl">fieldtrip-bounces@science.ru.nl</a> <<a href="mailto:fieldtrip-bounces@science.ru.nl">fieldtrip-bounces@science.ru.nl</a>> on behalf of "Jörn M. Horschig" <<a href="mailto:jm.horschig@donders.ru.nl">jm.horschig@donders.ru.nl</a>><br>Sent: Tuesday, 3 June 2014 6:16 PM<br>To: FieldTrip discussion list<br>Subject: Re: [FieldTrip] ft_mvaranalysis<br><br>Hi Tyler,<br><br>most likely your data is rank deficient. You can check this by<br><blockquote type="cite"><blockquote type="cite">rank(data.trial{1})<br></blockquote></blockquote><br>You probably won't get 116 (#channels) as a result. If I remember<br>correctly your data needs to have full-rank for mvaranalysis.<br><br>Best,<br>Jörn<br><br><br>On 6/3/2014 9:50 AM, Tyler Grummett wrote:<br><blockquote type="cite">JM,<br><br><br>My data has the following format:<br><br><br>data =<br><br><br>fsample: 500<br>sampleinfo: [14x2 double]<br>trial: {1x14 cell}<br>time: {1x14 cell}<br>label: {1x116 cell}<br>cfg: [1x1 struct]<br><br>I had a look and there are no NaNs or anything. I have tried running<br>using the coherence method for connectivity analysis (hence I didnt<br>need to use mvaranalysis) and it seemed to work fine.<br><br>Can you give me any suggestions as to what the problems with my data<br>could be?<br><br>Tyler<br><br><br><br>*************************<br><br>/Tyler Grummett ( BBSc, BSc(Hons I))/<br>/PhD Candidate/<br>/Brain Signals Laboratory/<br>/Flinders University/<br>/Rm 5A301/<br>/Ext 66124/<br>------------------------------------------------------------------------<br>*From:* <a href="mailto:fieldtrip-bounces@science.ru.nl">fieldtrip-bounces@science.ru.nl</a><br><<a href="mailto:fieldtrip-bounces@science.ru.nl">fieldtrip-bounces@science.ru.nl</a>> on behalf of jan-mathijs schoffelen<br><<a href="mailto:jan.schoffelen@donders.ru.nl">jan.schoffelen@donders.ru.nl</a>><br>*Sent:* Tuesday, 3 June 2014 5:06 PM<br>*To:* FieldTrip discussion list<br>*Subject:* Re: [FieldTrip] ft_mvaranalysis<br>This is a low level matlab error and suggests a problem with your data.<br><br><br>On Jun 3, 2014, at 9:32 AM, Tyler Grummett<br><<a href="mailto:tyler.grummett@flinders.edu.au">tyler.grummett@flinders.edu.au</a><br><<a href="mailto:tyler.grummett@flinders.edu.au">mailto:tyler.grummett@flinders.edu.au</a>>> wrote:<br><br><blockquote type="cite">Using the same code it generates the error:<br><br>Error using chol<br>Matrix must be positive definite.<br><br>Error in armorf (line 40)<br>ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))');<br><br>Error in ft_mvaranalysis (line 395)<br>[ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}),<br>size(tmpdata.trial{1},2),<br>cfg.order);<br><br><br><br>*************************<br><br>/Tyler Grummett ( BBSc, BSc(Hons I))/<br>/PhD Candidate/<br>/Brain Signals Laboratory/<br>/Flinders University/<br>/Rm 5A301/<br>/Ext 66124/<br>------------------------------------------------------------------------<br>*From:*<a href="mailto:fieldtrip-bounces@science.ru.nl">fieldtrip-bounces@science.ru.nl</a><br><<a href="mailto:fieldtrip-bounces@science.ru.nl">mailto:fieldtrip-bounces@science.ru.nl</a>><<a href="mailto:fieldtrip-bounces@science.ru.nl">fieldtrip-bounces@science.ru.nl</a><br><<a href="mailto:fieldtrip-bounces@science.ru.nl">mailto:fieldtrip-bounces@science.ru.nl</a>>> on behalf of jan-mathijs<br>schoffelen <<a href="mailto:jan.schoffelen@donders.ru.nl">jan.schoffelen@donders.ru.nl</a><br><<a href="mailto:jan.schoffelen@donders.ru.nl">mailto:jan.schoffelen@donders.ru.nl</a>>><br>*Sent:*Tuesday, 3 June 2014 4:49 PM<br>*To:*FieldTrip discussion list<br>*Subject:*Re: [FieldTrip] ft_mvaranalysis<br>Hi Tyler,<br><br>Try using ft_hastoolbox(‘bsmart’,1) and then in the cfg for<br>ft_mvaranalysis cfg.toolbox = ‘bsmart’<br><br>Best,<br>Jan-Mathijs<br><br>On Jun 3, 2014, at 3:39 AM, Tyler Grummett<br><<a href="mailto:tyler.grummett@flinders.edu.au">tyler.grummett@flinders.edu.au</a><br><<a href="mailto:tyler.grummett@flinders.edu.au">mailto:tyler.grummett@flinders.edu.au</a>>> wrote:<br><br><blockquote type="cite">Hello fieldtrippers,<br><br>Im having problems with ft_mvaranalysis at line 390: [ar, rc, pe] =<br>mvar(dat', cfg.order, cfg.mvarmethod);<br><br>The error message is:<br><br>Undefined function 'mvar' for input arguments of type 'double'.<br><br>​ Ive tried looking for the function, but I cant find it. Is it<br>likely that it is hidden or absent?<br><br>I swear this has worked before on old data, and I didnt update the<br>toolbox between trying it<br>with the old data and with the new data. I have now updated the<br>fieldtrip toolbox and I have<br>tried running the code again, but no luck.<br><br>Tyler<br><br>*************************<br><br>/Tyler Grummett ( BBSc, BSc(Hons I))/<br>/PhD Candidate/<br>/Brain Signals Laboratory/<br>/Flinders University/<br>/Rm 5A301/<br>/Ext 66124/<br>_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a> <<a href="mailto:fieldtrip@donders.ru.nl">mailto: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><br></blockquote>Jan-Mathijs Schoffelen, MD PhD<br><br>Donders Institute for Brain, Cognition and Behaviour,<br>Centre for Cognitive Neuroimaging,<br>Radboud University Nijmegen, The Netherlands<br><br>Max Planck Institute for Psycholinguistics,<br>Nijmegen, The Netherlands<br><br><a href="mailto:J.Schoffelen@donders.ru.nl">J.Schoffelen@donders.ru.nl</a> <<a href="mailto:J.Schoffelen@donders.ru.nl">mailto:J.Schoffelen@donders.ru.nl</a>><br>Telephone: +31-24-3614793<br><br><a href="http://www.hettaligebrein.nl">http://www.hettaligebrein.nl</a> <<a href="http://www.hettaligebrein.nl/">http://www.hettaligebrein.nl/</a>><br><br>_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a> <<a href="mailto:fieldtrip@donders.ru.nl">mailto: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><br></blockquote>Jan-Mathijs Schoffelen, MD PhD<br><br>Donders Institute for Brain, Cognition and Behaviour,<br>Centre for Cognitive Neuroimaging,<br>Radboud University Nijmegen, The Netherlands<br><br>Max Planck Institute for Psycholinguistics,<br>Nijmegen, The Netherlands<br><br><a href="mailto:J.Schoffelen@donders.ru.nl">J.Schoffelen@donders.ru.nl</a> <<a href="mailto:J.Schoffelen@donders.ru.nl">mailto:J.Schoffelen@donders.ru.nl</a>><br>Telephone: +31-24-3614793<br><br><a href="http://www.hettaligebrein.nl">http://www.hettaligebrein.nl</a><br><br><br><br>_______________________________________________<br>fieldtrip mailing list<br>fieldtrip@donders.ru.nl<br>http://mailman.science.ru.nl/mailman/listinfo/fieldtrip<br></blockquote><br>--<br>Jörn M. Horschig<br>PhD Student<br>Donders Institute for Brain, Cognition and Behaviour<br>Centre for Cognitive Neuroimaging<br>Radboud University Nijmegen<br>Neuronal Oscillations Group<br>FieldTrip Development Team<br><br>P.O. Box 9101<br>NL-6500 HB Nijmegen<br>The Netherlands<br><br>Contact:<br>E-Mail: <a href="mailto:jm.horschig@donders.ru.nl">jm.horschig@donders.ru.nl</a><br>Tel:    +31-(0)24-36-68493<br>Web: <a href="http://www.ru.nl/donders">http://www.ru.nl/donders</a><br><br>Visiting address:<br>Trigon, room 2.30<br>Kapittelweg 29<br>NL-6525 EN Nijmegen<br>The Netherlands<br><br>_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>http://mailman.science.ru.nl/mailman/listinfo/fieldtrip<br><br>_______________________________________________<br>fieldtrip mailing list<br>fieldtrip@donders.ru.nl<br>http://mailman.science.ru.nl/mailman/listinfo/fieldtrip<br><br>_______________________________________________<br>fieldtrip mailing list<br>fieldtrip@donders.ru.nl<br>http://mailman.science.ru.nl/mailman/listinfo/fieldtrip<br></blockquote><br><br>--<br>Jörn M. Horschig<br>PhD Student<br>Donders Institute for Brain, Cognition and Behaviour<br>Centre for Cognitive Neuroimaging<br>Radboud University Nijmegen<br>Neuronal Oscillations Group<br>FieldTrip Development Team<br><br>P.O. Box 9101<br>NL-6500 HB Nijmegen<br>The Netherlands<br><br>Contact:<br>E-Mail: <a href="mailto:jm.horschig@donders.ru.nl">jm.horschig@donders.ru.nl</a><br>Tel:    +31-(0)24-36-68493<br>Web: <a href="http://www.ru.nl/donders">http://www.ru.nl/donders</a><br><br>Visiting address:<br>Trigon, room 2.30<br>Kapittelweg 29<br>NL-6525 EN Nijmegen<br>The Netherlands<br><br>_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>http://mailman.science.ru.nl/mailman/listinfo/fieldtrip<br><br>_______________________________________________<br>fieldtrip mailing list<br>fieldtrip@donders.ru.nl<br>http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</blockquote></div><br><div apple-content-edited="true">
<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;  "><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;  "><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;  "><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;  "><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;  "><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;  "><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;  "><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;  "><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; "><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>