<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Dear all, <br>
    <br>
    I'm trying to run ft_sourcestatistics with a specified ROI. It's
    data (MNEs) averaged over time.<br>
    <br>
    If I run ft_sourcestatistics without an ROI, I get a cluster with
    prob = .178. It looks like this (figure attached), where I masked
    using the t-values.<br>
    Since I'm dealing with an N400-like component, I've got good reasons
    to expect the effect to be localised (mainly) to left temporal
    areas. <br>
    <br>
    So I tried adding this to my cfg:<br>
    <br>
    cfgst.atlas        =  'aal\ROI_MNI_V4.nii';<br>
    cfgst.roi          = {'Temporal_Mid_L'  'Temporal_Sup_L' 
    'Temporal_Inf_L' };<br>
    cfgst.avgoverroi   = 'yes';<br>
    cfgst.hemisphere   = 'left';<br>
    cfgst.inputcoord   = 'mni' ;<br>
    stat = ft_sourcestatistics(cfgst, iRel{:}, iIde{:}); <br>
    <br>
    If cfgst.avgoverroi   == 'yes'; I get the following error:<br>
    <br>
    ??? In an assignment  A(:) = B, the number of elements in A and B<br>
    must be the same.<br>
    Error in ==> clusterstat at 187<br>
        tmp(cfg.inside) = postailobs;<br>
    Error in ==> ft_statistics_montecarlo at 326<br>
      [stat, cfg] = clusterstat(cfg, statrand,
    statobs,'issource',issource);<br>
    Error in ==> statistics_wrapper at 298<br>
        [stat, cfg] = statmethod(cfg, dat, design, 'issource',issource);<br>
    Error in ==> ft_sourcestatistics at 107<br>
        [stat, cfg] = statistics_wrapper(cfg, varargin{:});<br>
    <br>
    If cfgst.avgoverroi   == 'no'; <br>
    ft outputs "found  positive clusters in observed data" and
    stat.posclusters/negclusters is only NaN. This is regardless of
    whether cfgst.roi is one label or a cell array.<br>
    <br>
    Does anyone know what I'm doing wrong?<br>
    I've been completely stuck on source statistics for these MNEs for
    days, so <i>any</i> help would be highly appreciated, even if it is
    to suggest another way to do the stats!<br>
    <br>
    Thanks a lot, Vitória<br>
  </body>
</html>