<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle"></style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Dear fellow FieldTrippers,
<div><br>
</div>
<div>I am planning to do granger causality analysis on human ECoG data. For this I need to first run ft_mvaranalysis (http://www.fieldtriptoolbox.org/tutorial/connectivity). However when I do this I get an error message that the variable 'dof' variable or function
 is missing, so it seems like for some reason the degrees of freedom are not calculated. I wonder if there is something I am doing wrong inusing thsi function or if this is a potential bug. </div>
<div><br>
</div>
<div>The data I am trying to analyse is human ECoG of a simple visual stimulation task in which I in first instance want to compare granger-causality in stimulation versus baseline periods. Visual stimulation takes place is 1 second long starting and t=0. Below
 I have included the the error message and the cconfiguration settings I used. The problem occurs with the latest version of Fieldtrip (June 22nd 2016), and does not depend on whether I specify the 'biosig' or 'bsmart' toolbox. The error occurs after FieldTrip
 indicates it is cumputing the AR-model and is starting the </div>
<div><br>
</div>
<div>Best wishes,</div>
<div><br>
</div>
<div>René Scheeringa</div>
<div><br>
</div>
<div><br>
</div>
<div><b>Error message:</b></div>
<div><br>
</div>
<div>
<div>Undefined function or variable 'dof'.</div>
<div><br>
</div>
<div>Error in ft_mvaranalysis (line 515)</div>
<div>mvardata.dof      = dof;</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div><b>Configuration structure</b>:</div>
<div><br>
</div>
<div>
<div>cfg=[];</div>
<div><br>
</div>
<div>cfg.toolbox    = 'biosig'; %bsmart';</div>
<div>cfg.mvarmethod = 2;</div>
<div>cfg.order      = 10;</div>
<div><br>
</div>
<div>cfg.channelcmb = cell(3,2);</div>
<div>cfg.channelcmb{1,1}='OcL05';cfg.channelcmb{1,2}='OcL07';</div>
<div>cfg.channelcmb{2,1}='OcL05';cfg.channelcmb{2,2}='OcL13';</div>
<div>cfg.channelcmb{3,1}='OcL07';cfg.channelcmb{3,2}='OcL13';</div>
<div><br>
</div>
<div>cfg.keeptrials = 'no'; %'yes';</div>
<div>cfg.jackknife  = 'no'; % (default) or 'yes'</div>
<div>cfg.zscore     = 'yes'; %'no' (default) </div>
<div>cfg.demean     = 'yes'; %'yes' (default) or 'no'</div>
<div>cfg.ems        = 'no'; %no' (default) or 'yes' explicit removal ensemble mean</div>
<div>cfg.t_ftimwin = 0.8; %the width of the sliding window on which the coefficients are estimated</div>
<div>cfg.toi       = [-0.4 0.6]; %[t1 t2 ... tx] the time points at which the windows are centered</div>
<div><br>
</div>
<div>mvardata = ft_mvaranalysis(cfg, data_in);</div>
</div>
<div><br>
</div>
<div>
<div><br>
</div>
</div>
</div>
</body>
</html>