-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmspm_cfg_model_estimation.m
80 lines (72 loc) · 3.35 KB
/
mspm_cfg_model_estimation.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
function results = mspm_cfg_model_estimation
%
%
%
%
rev = '$Rev: 3993 $';%??
if ~isdeployed, addpath(fullfile(spm('dir'),'toolbox','MSPM_toolbox')); end
% ---------------------------------------------------------------------
% spmmat Select SPM.mat
% ---------------------------------------------------------------------
spmmat = cfg_files;
spmmat.tag = 'spmmat';
spmmat.name = 'Select SPM.mat';
spmmat.help = {'Select (at least 2) SPM.mat file '};
spmmat.filter = 'mat';
spmmat.ufilter = '^SPM\.mat$';
spmmat.num = [1 inf];
% ---------------------------------------------------------------------
% cwd Directory
% ---------------------------------------------------------------------
swd = cfg_files;
swd.tag = 'swd';
swd.name = 'Directory';
swd.help = {'Select a directory where the MSPM.mat file containing the specified SPM and L structures will be written.'};
swd.filter = 'dir';
swd.ufilter = '.*';
swd.num = [1 1];
% ---------------------------------------------------------------------
% model estimation branch
% ---------------------------------------------------------------------
model_estimation = cfg_exbranch;
model_estimation.tag = 'model_estimation';
model_estimation.name = 'Model estimation';
model_estimation.val = {spmmat swd};
model_estimation.help = {'Provide at least 2 SPM.mat in order to estimate the MSPM.mat for a MANOVA, and choose a directory where all the files and images will be written. Then use the analyse module... '};
model_estimation.prog = @mspm_run_model_estimation;
model_estimation.modality = {'FMRI' 'PET' 'EEG'};
%%
% ---------------------------------------------------------------------
% spmmat Select SPM.mat
% ---------------------------------------------------------------------
spmmat = cfg_files;
spmmat.tag = 'spmmat';
spmmat.name = 'Select MSPM.mat';
spmmat.help = {'Select MSPM.mat file that contains SPM and L structures'};
spmmat.filter = 'mat';
spmmat.num = [1 1];
% ---------------------------------------------------------------------
% analyse branch
% ---------------------------------------------------------------------
analyse = cfg_exbranch;
analyse.tag = 'analyse';
analyse.name = 'Analyse ';
analyse.val = {spmmat};
analyse.help = {'Choose the MSPM file containing the SPM and L structure. The first contrast to provide is the contrast concerning the design matrix X. The second contrast is the L; concerning the Y space.'
''
'Test diff. among groups -> Are there differences among the groups?'
'c=[1 -1]'' L=[1 0 0 0 0'
' 0 1 0 0 0'
' 0 0 1 0 0'
' 0 0 0 1 0'
' 0 0 0 0 1]'};
analyse.prog = @mspm_run_results;
analyse.modality = {'FMRI' 'PET' 'EEG'};
% ---------------------------------------------------------------------
% results Report
% ---------------------------------------------------------------------
results = cfg_choice;
results.tag = 'results';
results.name = 'MSPM';
results.values = {model_estimation analyse};
results.help = {''};