<div dir="ltr"><div>Hello Fieldtrip!</div><div><br></div><div>I am hoping to extend the technique outlined in the following page to behavioral data across time.</div><div dir="ltr"><br></div><div dir="ltr"><a href="http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables?s[]=regression">http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables?s[]=regression</a><br></div><div dir="ltr"><br></div><div>I have behavioral data for each subject over a series of experiments and I want to test whether changes in averaged topographic frequency information is related to these behavioral changes over time across a population of subjects. The way I was hoping to code this up is as follows:</div><div><br></div><div>subject 1 behavioral data = [0.3 0.6 0.9]</div><div>subject 2 behavioral data = [0.2 0.6 0.75]  <br></div><div><br></div><div>cfg.statistic = ft_statfun_depsamplesregt;</div><div>design(1,:) = [0.3 0.6 0.9 0.2 0.6 0.75]  </div><div>design(2,:) = [1 1 1 1 2 2 2 2]</div><div>cfg.design = design;</div><div>cfg.ivar = 1;</div><div>cfg.uvar = 2;</div><div><br></div><div>I am assuming here that the unit of observation is subjects and I have a time series of variables for each subject placed in ivar. finally the input to ft_freqstatistics will be an averaged struct and the powspctrm with have dimord = subject_channel_frequency_time.</div><div><br></div><div>Am I doing this correctly? Will this work? If not, do you have any suggestions for how to continue?</div><div>Additionally some subjects participated in 7 experiments and some participated in 10. Can I NaN out the missing data, or should I limit this analysis to the experiments that all subjects participated in?</div><div><br></div><div>Thanks for the help!</div><div>James</div></div>