-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathttest_forITC.m
More file actions
70 lines (29 loc) · 1.08 KB
/
ttest_forITC.m
File metadata and controls
70 lines (29 loc) · 1.08 KB
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
% hihger ITC within the condition than the across condition
% clear;
% comp = mean(Y_tar,3);
% ITC value of the target and nontarget trials
ITC_tar = table2array(itrsubjectsS1(:,2));
ITC_nontar = table2array(itrsubjectsS1(:,5));
% mean_tar = mean(ITC_tar(1:end-1));
% mean_nontar = mean(ITC_nontar(2:end));
% sd_tar = std(ITC_tar(1:end-1));
% sd_nontar = std(ITC_nontar(2:end));
% [h,p,ci,stats] = ttest(ITC_tar(1:end-1),ITC_nontar(2:end),'Alpha',0.01);
mean_tar = mean(ITC_tar);
mean_nontar = mean(ITC_nontar);
sd_tar = std(ITC_tar);
sd_nontar = std(ITC_nontar);
[h,p,ci,stats] = ttest(ITC_tar,ITC_nontar,'Alpha',0.01);
cohens_D = (mean_tar - mean_nontar)/(sqrt((sd_tar^2+sd_nontar^2)/2));
disp(['h: ',num2str(h), ' p: ', num2str(p), ' cohens_D: ', num2str(cohens_D)]);
stats
N = length(ITC_tar);
if (N<40)
cohens_D = cohens_D*((N-3)/(N-2.25))*sqrt((N-2)/N);
else
cohens_D = cohens_D;
end
% this test shows that the dependent t test shows that the ITC during the
% target condition is sigficantly higher than the non target conditon
%%
% First component