StatisticTest.h
Go to the documentation of this file.
/***************************************************************************
File : StatisticTest.h
Project : QtiPlot
--------------------------------------------------------------------
Copyright : (C) 2010 by Ion Vasilief
Email (use @ for *) : ion_vasilief*yahoo.fr
Description : Base class for statistic tests
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, *
* Boston, MA 02110-1301 USA *
* *
***************************************************************************/
#ifndef STATISTICTEST_H
#define STATISTICTEST_H
#include <Statistics.h>
class Table;
class StatisticTest : public Statistics
{
Q_OBJECT
public:
enum Tail{Left = 0, Right = 1, Both = 2};
enum TestType{StudentTest = 0, NormalityTest = 1, ChiSquareTest = 2, AnovaTest = 3};
StatisticTest(ApplicationWindow *parent, double testValue = 0.0, double level = 0.05, const QString& sample = QString());
void setTail(const Tail& tail){d_tail = tail;};
void setTestValue(double val){d_test_val = val;};
void showDescriptiveStatistics(bool show = true){d_descriptive_statistics = show;};
void setSignificanceLevel(double s){
if (s < 0.0 || s > 1.0)
return;
d_significance_level = s;
}
virtual QString logInfo(){return Statistics::logInfo();};
virtual double statistic(){return 0.0;};
virtual double pValue(){return 0.0;};
virtual double lcl(double){return 0.0;};
virtual double ucl(double){return 0.0;};
virtual Table *resultTable(const QString& name = QString());
virtual void outputResultsTo(Table *);
protected:
double d_test_val;
double d_significance_level;
int d_tail;
bool d_descriptive_statistics;
};
#endif
StatisticTest::outputResultsTo
virtual void outputResultsTo(Table *)
Definition: StatisticTest.cpp:41
StatisticTest::Tail
Tail
Definition: StatisticTest.h:42
StatisticTest::StatisticTest
StatisticTest(ApplicationWindow *parent, double testValue=0.0, double level=0.05, const QString &sample=QString())
Definition: StatisticTest.cpp:32
StatisticTest::pValue
virtual double pValue()
Definition: StatisticTest.h:58
StatisticTest::AnovaTest
Definition: StatisticTest.h:43
StatisticTest::TestType
TestType
Definition: StatisticTest.h:43
StatisticTest::setSignificanceLevel
void setSignificanceLevel(double s)
Definition: StatisticTest.h:50
Statistics.h
StatisticTest::statistic
virtual double statistic()
Definition: StatisticTest.h:57
StatisticTest::Right
Definition: StatisticTest.h:42
Statistics
Abstract base class for data analysis operations.
Definition: Statistics.h:38
StatisticTest::showDescriptiveStatistics
void showDescriptiveStatistics(bool show=true)
Definition: StatisticTest.h:48
StatisticTest::d_descriptive_statistics
bool d_descriptive_statistics
Definition: StatisticTest.h:72
StatisticTest::StudentTest
Definition: StatisticTest.h:43
Statistics::logInfo
QString logInfo(bool header=true)
Definition: Statistics.cpp:120
StatisticTest::d_significance_level
double d_significance_level
Definition: StatisticTest.h:70
StatisticTest::setTail
void setTail(const Tail &tail)
Definition: StatisticTest.h:46
StatisticTest::setTestValue
void setTestValue(double val)
Definition: StatisticTest.h:47
ApplicationWindow
QtiPlot's main window.
Definition: ApplicationWindow.h:133
StatisticTest::logInfo
virtual QString logInfo()
Definition: StatisticTest.h:56
StatisticTest::NormalityTest
Definition: StatisticTest.h:43
StatisticTest::d_tail
int d_tail
Definition: StatisticTest.h:71
StatisticTest::resultTable
virtual Table * resultTable(const QString &name=QString())
Returns a pointer to the table created to display the results.
Definition: StatisticTest.cpp:67
StatisticTest::d_test_val
double d_test_val
Definition: StatisticTest.h:69
StatisticTest::lcl
virtual double lcl(double)
Lower Confidence Limit.
Definition: StatisticTest.h:60
ChiSquareTest
Chi-Square test for variance.
Definition: ChiSquareTest.h:35
StatisticTest::Left
Definition: StatisticTest.h:42
Table
MDI window providing a spreadsheet table with column logic.
Definition: Table.h:57
StatisticTest
Abstract base class for statistic tests.
Definition: StatisticTest.h:37
StatisticTest::Both
Definition: StatisticTest.h:42
StatisticTest::ucl
virtual double ucl(double)
Upper Confidence Limit.
Definition: StatisticTest.h:62