Simple Tests

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

One-Sample T-Test

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Note: This can also be done using the wrapper aps_onesampt.m

IN.N_subs = N; % Number of input images

IN.Between = 1; % Two factors

IN.EqualVar = 1; % Do variance corrections

IN.Independent = 1; % Do independence correction

F = CreateDesign(IN);

I.OutputDir = pwd;

I.F = F;

I.minN = 5;

I.DoOnlyAll = 1;

I.RemoveOutliers=0;

I.Scans = {...};

I.Cons(1).name = ‘Effect’

I.Cons(1).Groups = 1;

I.Cons(1).Levs = 1;

I.Cons(1).ET = 1;

I = GLM_Flex(I);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Two-Sample T-Test

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Note: This can also be done using the wrapper aps_twosampt.m

IN.N_subs = [N1 N2]; % Number per each of the 2 groups

IN.Between = 2; % Two factors

IN.EqualVar = 1; % Do variance corrections

IN.Independent = 1; % Do independence correction

F = CreateDesign(IN);

I.OutputDir = pwd;

I.F = F;

I.minN = 5;

I.DoOnlyAll = 1;

I.RemoveOutliers=0;

I.Scans = {...};

I.Cons(1).name = ‘Group Diff’

I.Cons(1).Groups = {1 2};

I.Cons(1).Levs = 2;

I.Cons(1).ET = 1;

I = GLM_Flex(I);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Paired-Sample T-Test

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Note: This can also be done using the wrapper aps_pairedt.m

IN.N_subs = [N]; % Number of Subjects

IN.Within = 2; % Two factors

IN.EqualVar = 1; % Do variance corrections

IN.Independent = 1; % Do independence correction

F = CreateDesign(IN);

I.OutputDir = pwd;

I.F = F;

I.minN = 5;

I.DoOnlyAll = 1;

I.RemoveOutliers=0;

I.Scans = {...};

I.Cons(1).name = ‘Group Diff’

I.Cons(1).Groups = {1 2};

I.Cons(1).Levs = 2;

I.Cons(1).ET = 2;

I = GLM_Flex(I);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Generic One-Way Between Subjects ANOVA

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Note: This can also be done using the wrapper aps_onewayanova_between.m

IN.N_subs = [N]; % Number of Subjects

IN.Between = 3; % Two factors

IN.EqualVar = 0; % Do variance corrections

IN.Independent = 1; % Do independence correction

F = CreateDesign(IN);

I.OutputDir = pwd;

I.F = F;

I.minN = 5;

I.DoOnlyAll = 1;

I.RemoveOutliers=0;

I.Scans = {...};

I.Cons(1).name = ‘Group Diff’

I.Cons(1).Groups = {1 2 3};

I.Cons(1).Levs = 3;

I.Cons(1).ET = 1;

%% You can also test for differences between subsets of the groups

I.Cons(2).name = ‘Group Diff’

I.Cons(2).Groups = {1 2};

I.Cons(2).Levs = 2;

I.Cons(2).ET = 1;

%% You can even generate analogues to the one sample t-tests for each group.

I.Cons(3).name = ‘Group Diff’

I.Cons(3).Groups = {1};

I.Cons(3).Levs = 1;

I.Cons(3).ET = 1;

I = GLM_Flex(I);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Generic One-Way Repeated Measures ANOVA

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Note: This can also be done using the wrapper aps_onewayanova_repeated.m

IN.N_subs = [N]; % Number of Subjects

IN.Within = 3; % Two factors

IN.EqualVar = 0; % Do variance corrections

IN.Independent = 0; % Do independence correction

F = CreateDesign(IN);

I.OutputDir = pwd;

I.F = F;

I.minN = 5;

I.DoOnlyAll = 1;

I.RemoveOutliers=0;

I.Scans = {...};

I.Cons(1).name = ‘Group Diff’

I.Cons(1).Groups = {1 2 3};

I.Cons(1).Levs = 3;

I.Cons(1).ET = 2;

%% You can also test for differences between subsets of the groups

I.Cons(2).name = ‘Group Diff’

I.Cons(2).Groups = {1 2};

I.Cons(2).Levs = 2;

I.Cons(2).ET = 2;

%% You can even generate analogues to the one sample t-tests for each group.

I.Cons(3).name = ‘Group Diff’

I.Cons(3).Groups = {1};

I.Cons(3).Levs = 1;

I.Cons(3).ET = 1; % Notice that since this effect is a between subjects effect that the ET is set to 1.

I = GLM_Flex(I);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%