Skip to content

2nd level command lines

Cyril Pernet edited this page Oct 13, 2020 · 1 revision

Statistical tests

All second-level tests can be called via limo_random_select.m. Below are examples from the tutorial.

one-sample t-test

chanlocs = XXX\derivatives\limo_gp_level_chanlocs.mat';
files = {'XXX\con4_files_FaceRepAll_GLM_Channels_Time_WLS.txt'};
LIMOPath = limo_random_select('one sample t-test',chanlocs,'LIMOfiles',files,...
'analysis_type','Full scalp analysis', 'type','Channels','nboot',1000,'tfce',0);

paired t-test

chanlocs = 'XXX\derivatives\limo_gp_level_chanlocs.mat';
files = {'XXX\con1_files_FaceRepAll_GLM_Channels_Time_WLS.txt' ; 'XXX\con3_files_FaceRepAll_GLM_Channels_Time_WLS.txt'};
LIMOPath = limo_random_select('paired t-test',chanlocs,'LIMOfiles',files,...
'analysis_type','Full scalp analysis', 'type','Channels','nboot',1000,'tfce',0);

two-samples t-test

chanlocs = XXX\derivatives\limo_gp_level_chanlocs.mat';  
Files{1} =XXX\LIMO_Face_detection\Beta_files_Gp1_Faces_GLM_Channels_Frequency_WLS.txt';  
Files{2} = 'XXX\LIMO_Face_detection\Beta_files_Gp2_Faces_GLM_Channels_Frequency_WLS.txt';  
LIMOPath = limo_random_select('two-samples t-test',chanlocs,'LIMOfiles',Files,...  
   'analysis_type','Full scalp analysis', 'type','Channels','parameter',[1;1],'nboot',1000,'tfce',0);  

Regression

chanlocs = XXX\derivatives\limo_gp_level_chanlocs.mat';  
LIMOPath = limo_random_select('regression',chanlocs,'LIMOfiles',...  
    'XXX\LIMO_Face_detection\con4_files_FaceRepAll_GLM_Channels_Time_WLS.txt', ...  
    'analysis type','Full scalp analysis', type','Channels','nboot',0,'tfce',0,'regressor',...  
    'XXX\LIMO_Face_detection\2nd_level\regression\age_regressor.mat',...  
    'zscore','Yes','skip design check','Yes')  

ANOVA

chanlocs = 'XXX\derivatives\limo_gp_level_chanlocs.mat';  
Files = cell(2,1); % groups in rows, repeated measures in columns  
Files{1} = 'XXX\LIMO_Face_detection\Beta_files_Gp1_Faces_GLM_Channels_Time_WLS.txt';  
Files{2} = 'XXX\LIMO_Face_detection\Beta_files_Gp2_Faces_GLM_Channels_Time_WLS.txt';  
LIMOPath = limo_random_select('Repeated Measures ANOVA',chanlocs,'LIMOfiles',Files,...  
    'analysis_type','Full scalp analysis','parameters',{[1 2 3];[1 2 3]},...
    'factor names',{'face'},'type','Channels','nboot',1000,'tfce',0,'skip design check','yes');

Additional Plots

We can easily create summary statistics using limo_central_tendency_and_ci.m - for instance below we compute mean (across subjects) of the weighted mean (across trials) pooling conditions 7, 8 , 9 (unfamiliar faces) all in one line of code.

chan_loc = 'XXX\derivatives\limo_gp_level_chanlocs.mat';
Files = 'XXX\....\LIMO_files_FaceRepAll_GLM_Channels_Frequency_WLS.txt';
parameters = [7 8 9];
savename = 'XXX\derivatives\...\unfamiliar.mat';
limo_central_tendency_and_ci(Files, parameters, chan_loc, 'Weighted mean', 'Mean', [],savename)  
Clone this wiki locally