IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
vectorcomp_ttest_right.m
Go to the documentation of this file.
1 %> Vector Comparer - paired t-test right tail
2 %
3 %> result is -log10(p_value)
4 %>
5 %> Right tail test:
6 %> @ H0: mean(v1-v2) < 0
7 %>
8 %> Please note that in the cross-test table (created by crosstest()), v1 corresponds to the row,
9 %> and v2 corresponds to the column.
10 %>
11 %> It does the test twice, the second time with reversed vectors. So, if one p-value is small, the other one is likely to be very high
13  properties
14  %> Whether to make result as -log10(p_value)
15  flag_logtake = 1;
16  end;
17 
18  methods(Access=protected)
19  function z = do_test(o, v1, v2)
20  [dummy, z1] = ttest(v1, v2, 0.05, 'right');
21  [dummy, z2] = ttest(v2, v1, 0.05, 'right');
22  z = [z1, z2];
23  if o.flag_logtake
24  z = -log10(z);
25  end;
26  end;
27  end;
28 
29  methods
30  function o = vectorcomp_ttest_right(o)
31  o.classtitle = 'T-Test right tail';
32  o.flag_params = 0;
33  end;
34  end;
35 end
Paired Vector Comparer base class.
Definition: vectorcomp.m:9
Vector Comparer - paired t-test right tail.
Analysis Session (AS) base class.
Definition: as.m:6