QtiPlot
0.9.8.2
Main Page
Related Pages
Classes
Files
File List
File Members
qtiplot
src
analysis
StatisticTest.h
Go to the documentation of this file.
1
/***************************************************************************
2
File : StatisticTest.h
3
Project : QtiPlot
4
--------------------------------------------------------------------
5
Copyright : (C) 2010 by Ion Vasilief
6
Email (use @ for *) : ion_vasilief*yahoo.fr
7
Description : Base class for statistic tests
8
9
***************************************************************************/
10
11
/***************************************************************************
12
* *
13
* This program is free software; you can redistribute it and/or modify *
14
* it under the terms of the GNU General Public License as published by *
15
* the Free Software Foundation; either version 2 of the License, or *
16
* (at your option) any later version. *
17
* *
18
* This program is distributed in the hope that it will be useful, *
19
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
20
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
21
* GNU General Public License for more details. *
22
* *
23
* You should have received a copy of the GNU General Public License *
24
* along with this program; if not, write to the Free Software *
25
* Foundation, Inc., 51 Franklin Street, Fifth Floor, *
26
* Boston, MA 02110-1301 USA *
27
* *
28
***************************************************************************/
29
#ifndef STATISTICTEST_H
30
#define STATISTICTEST_H
31
32
#include <
Statistics.h
>
33
34
class
Table
;
35
37
class
StatisticTest
:
public
Statistics
38
{
39
Q_OBJECT
40
41
public
:
42
enum
Tail
{
Left
= 0,
Right
= 1,
Both
= 2};
43
enum
TestType
{
StudentTest
= 0,
NormalityTest
= 1,
ChiSquareTest
= 2,
AnovaTest
= 3};
44
45
StatisticTest
(
ApplicationWindow
*parent,
double
testValue = 0.0,
double
level = 0.05,
const
QString& sample = QString());
46
void
setTail
(
const
Tail
& tail){
d_tail
= tail;};
47
void
setTestValue
(
double
val){
d_test_val
= val;};
48
void
showDescriptiveStatistics
(
bool
show =
true
){
d_descriptive_statistics
= show;};
49
50
void
setSignificanceLevel
(
double
s){
51
if
(s < 0.0 || s > 1.0)
52
return
;
53
d_significance_level
= s;
54
}
55
56
virtual
QString
logInfo
(){
return
Statistics::logInfo
();};
57
virtual
double
statistic
(){
return
0.0;};
58
virtual
double
pValue
(){
return
0.0;};
60
virtual
double
lcl
(
double
){
return
0.0;};
62
virtual
double
ucl
(
double
){
return
0.0;};
63
65
virtual
Table
*
resultTable
(
const
QString& name = QString());
66
virtual
void
outputResultsTo
(
Table
*);
67
68
protected
:
69
double
d_test_val
;
70
double
d_significance_level
;
71
int
d_tail
;
72
bool
d_descriptive_statistics
;
73
};
74
75
#endif
Generated on Fri Mar 14 2014 22:59:33 for QtiPlot by
1.8.1.2