<div dir="ltr">Dear Fieldtrip team,<br><br>I hope this message finds you well. I am currently working on calculating the effective connectivity between sources using Granger causality in the FieldTrip toolbox. I have been using the following code:<br><br>cfg         = [];<br>cfg.method  ='granger';<br>% cfg.complex = 'absimag';<br>source_conn = ft_connectivityanalysis(cfg, source);<br>figure(9);imagesc(source_conn.cohspctrm);<br><br>However, I have encountered an error message:<br>"This function requires 'mvar', 'freqmvar' or 'freq' data as input, see ft_datatype_mvar or ft_datatype_freq."<br><br>Upon inspecting the ft_connectivityanalysis function, I noticed that it accepts either two inputs in the form of (cfg, source) or (cfg, freq). My confusion lies in understanding how to define 'freq' before applying this Granger causality code, and how this relates to the 'source' data.<br><br>Could you kindly provide some guidance or insights on how to properly handle the frequency data in conjunction with the source data for this granger connectivity analysis?<br><br>Thank you very much for your assistance.<br><br>Warm regards,<br>Yeganeh<br></div>