1 #ifndef _theplu_yat_statistics_tscore_ 2 #define _theplu_yat_statistics_tscore_ 30 #include <gsl/gsl_cdf.h> 37 namespace statistics {
53 tScore(
bool absolute=
true);
112 double* dof=0)
const;
170 double* dof=0)
const;
179 template<
typename T1,
typename T2>
180 double score(
const T1& pos,
const T2& neg,
double* dof=0)
const;
186 template<
typename T1,
typename T2>
187 double tScore::score(
const T1& pos,
const T2& neg,
double* dof)
const 189 double diff = pos.mean() - neg.mean();
191 *dof=pos.n()+neg.n()-2;
192 double s2=( (pos.sum_xx_centered()+neg.sum_xx_centered())/
193 (pos.n()+neg.n()-2));
194 double t=diff/sqrt(s2/pos.n()+s2/neg.n());
195 if (t<0 && absolute_)
Class for containing sample labels.
Definition: Target.h:47
The Department of Theoretical Physics namespace as we define it.
This is the yat interface to GSL vector.
Definition: VectorBase.h:55
Interface Class for score classes.
Definition: Score.h:42
Class for general weighted vector view.
Definition: DataLookupWeighted1D.h:43
Class for Fisher's t-test.
Definition: tScore.h:46