v2.0.0
Loading...
Searching...
No Matches
sts_ttest.h
Go to the documentation of this file.
1//=============================================================================================================
34
35#ifndef STS_TTEST_H
36#define STS_TTEST_H
37
38//=============================================================================================================
39// INCLUDES
40//=============================================================================================================
41
42#include "sts_global.h"
43#include "sts_types.h"
44
45//=============================================================================================================
46// EIGEN INCLUDES
47//=============================================================================================================
48
49#include <Eigen/Core>
50
51//=============================================================================================================
52// DEFINE NAMESPACE STSLIB
53//=============================================================================================================
54
55namespace STSLIB
56{
57
58//=============================================================================================================
63 Eigen::MatrixXd matTstat;
64 Eigen::MatrixXd matPval;
66};
67
68//=============================================================================================================
75{
76public:
77 //=========================================================================================================
87 static StatsTtestResult oneSample(const Eigen::MatrixXd& data,
88 double mu = 0.0,
90
91 //=========================================================================================================
101 static StatsTtestResult paired(const Eigen::MatrixXd& dataA,
102 const Eigen::MatrixXd& dataB,
104
105 //=========================================================================================================
115 static StatsTtestResult independent(const Eigen::MatrixXd& dataA,
116 const Eigen::MatrixXd& dataB,
118
119 //=========================================================================================================
128 static double tCdf(double t, int df);
129
130 //=========================================================================================================
135 static double regularizedBeta(double x, double a, double b);
136
137private:
138
139 //=========================================================================================================
143 static double betaCf(double x, double a, double b);
144
145 //=========================================================================================================
149 static double logBeta(double a, double b);
150
151 //=========================================================================================================
155 static double tToPval(double t, int df, StatsTailType tail);
156};
157
158} // namespace STSLIB
159
160#endif // STS_TTEST_H
Stats library type enumerations.
stats library export/import macros.
#define STSSHARED_EXPORT
Definition sts_global.h:50
Statistical testing (t-tests, F-tests, cluster permutation, multiple comparison correction).
StatsTailType
Definition sts_types.h:49
Eigen::MatrixXd matPval
Definition sts_ttest.h:64
Eigen::MatrixXd matTstat
Definition sts_ttest.h:63
T-test statistical testing.
Definition sts_ttest.h:75
static double regularizedBeta(double x, double a, double b)
static StatsTtestResult paired(const Eigen::MatrixXd &dataA, const Eigen::MatrixXd &dataB, StatsTailType tail=StatsTailType::Both)
Definition sts_ttest.cpp:87
static double tCdf(double t, int df)
static StatsTtestResult oneSample(const Eigen::MatrixXd &data, double mu=0.0, StatsTailType tail=StatsTailType::Both)
Definition sts_ttest.cpp:55
static StatsTtestResult independent(const Eigen::MatrixXd &dataA, const Eigen::MatrixXd &dataB, StatsTailType tail=StatsTailType::Both)
Definition sts_ttest.cpp:94