Statistics Class Reference

Abstract base class for data analysis operations. More...

`#include <Statistics.h>`

Inheritance diagram for Statistics:

## Public Member Functions

double * | data ()
| Returns the y values of the input data set. More...
unsigned int | dataSize ()
| Returns the size of the input data set. More...
virtual int | dof ()
| Returns the degrees of freedom. More...
QString | logInfo (bool header=true)
double | mean ()
virtual bool | run ()
| Actually does the job. Should be reimplemented in derived classes. More...
QString | sampleName ()
bool | setData (const QString &)
void | showResultsLog (bool show=true)
double | standardDeviation ()
double | standardError ()
| Statistics (ApplicationWindow *parent, const QString &name=QString())
double | variance ()
| ~Statistics ()

## Protected Member Functions

virtual void | freeMemory ()
| Frees the memory allocated for the X and Y data sets. More...
void | memoryErrorMessage ()

## Protected Attributes

QString | d_col_name
| The name of the source data set. More...
double * | d_data
| y data set to be analysed More...
double | d_mean
unsigned int | d_n
| The size of the data set to be analyzed. More...
bool | d_result_log
| Flag specifying if the results should be displayed in the results log. More...
double | d_sd
double | d_se
Table * | d_table
| A table source of data. More...
double | d_variance

## Detailed Description

Abstract base class for data analysis operations.

## Constructor & Destructor Documentation

## Statistics()

Statistics::Statistics | ( | ApplicationWindow * | parent,
|  | const QString & | name = `QString()`
| ) |  |

References setData().

Referenced by Anova::addSample(), and tTest::setSample2().

## ~Statistics()

Statistics::~Statistics | ( |  | ) |

References freeMemory().

## Member Function Documentation

## data()

double* Statistics::data | ( |  | ) |

inline

Returns the y values of the input data set.

References d_data.

Referenced by Anova::oneWayANOVA(), tTest::setSample2(), and Anova::twoWayANOVA().

## dataSize()

unsigned int Statistics::dataSize | ( |  | ) |

inline

Returns the size of the input data set.

References d_n.

Referenced by AnovaDialog::acceptNormalityTest(), Anova::addSample(), tTest::dof(), Anova::oneWayANOVA(), tTest::setSample2(), and Anova::twoWayANOVA().

## dof()

virtual int Statistics::dof | ( |  | ) |

inline virtual

Returns the degrees of freedom.

Reimplemented in tTest.

References d_n.

Referenced by ChiSquareTest::lcl(), ChiSquareTest::logInfo(), StatisticTest::outputResultsTo(), ChiSquareTest::pValue(), StatisticTest::resultTable(), and ChiSquareTest::ucl().

## freeMemory()

void Statistics::freeMemory | ( |  | ) |

protected virtual

Frees the memory allocated for the X and Y data sets.

Reimplemented in Anova, and tTest.

References d_data, and d_n.

Referenced by tTest::freeMemory(), Anova::freeMemory(), setData(), ShapiroWilkTest::ShapiroWilkTest(), standardError(), and ~Statistics().

## logInfo()

QString Statistics::logInfo | ( | bool | header = `true` | ) |

References d_col_name, ApplicationWindow::d_decimal_digits, d_mean, d_n, d_sd, d_se, and d_variance.

Referenced by ChiSquareTest::logInfo(), tTest::logInfo(), Anova::logInfo(), StatisticTest::logInfo(), run(), and standardError().

## mean()

double Statistics::mean | ( |  | ) |

inline

References d_mean.

Referenced by tTest::setSample2().

## memoryErrorMessage()

void Statistics::memoryErrorMessage | ( |  | ) |

protected

Referenced by Anova::oneWayANOVA(), setData(), standardError(), and Anova::twoWayANOVA().

## run()

bool Statistics::run | ( |  | ) |

virtual

Actually does the job. Should be reimplemented in derived classes.

Reimplemented in Anova.

References d_n, d_result_log, and logInfo().

## sampleName()

QString Statistics::sampleName | ( |  | ) |

inline

References d_col_name.

Referenced by Anova::logInfo(), StatisticTest::outputResultsTo(), and StatisticTest::resultTable().

## setData()

bool Statistics::setData | ( | const QString & | colName | ) |

References Table::cell(), Table::colIndex(), d_col_name, d_data, d_mean, d_n, d_sd, d_se, d_table, d_variance, freeMemory(), memoryErrorMessage(), Table::numRows(), ApplicationWindow::table(), and Table::text().

Referenced by Anova::addSample(), tTest::setSample1(), and Statistics().

## showResultsLog()

void Statistics::showResultsLog | ( | bool | show = `true` | ) |

inline

References d_result_log.

## standardDeviation()

double Statistics::standardDeviation | ( |  | ) |

inline

References d_sd.

Referenced by tTest::setSample2().

## standardError()

double Statistics::standardError | ( |  | ) |

inline

References d_se, freeMemory(), logInfo(), and memoryErrorMessage().

## variance()

double Statistics::variance | ( |  | ) |

inline

References d_variance.

## Member Data Documentation

## d_col_name

QString Statistics::d_col_name

protected

The name of the source data set.

Referenced by ShapiroWilkTest::infoString(), logInfo(), sampleName(), and setData().

## d_data

double* Statistics::d_data

protected

y data set to be analysed

Referenced by data(), freeMemory(), Anova::oneWayANOVA(), setData(), tTest::setSample2(), ShapiroWilkTest::ShapiroWilkTest(), and Anova::twoWayANOVA().

## d_mean

double Statistics::d_mean

protected

Referenced by tTest::lcl(), logInfo(), mean(), StatisticTest::outputResultsTo(), StatisticTest::resultTable(), setData(), tTest::setSample2(), tTest::t(), and tTest::ucl().

## d_n

unsigned int Statistics::d_n

protected

The size of the data set to be analyzed.

Referenced by Anova::addSample(), ChiSquareTest::chiSquare(), dataSize(), tTest::dof(), dof(), freeMemory(), ShapiroWilkTest::infoString(), ChiSquareTest::lcl(), tTest::lcl(), logInfo(), Anova::oneWayANOVA(), StatisticTest::outputResultsTo(), tTest::power(), ChiSquareTest::pValue(), tTest::pValue(), StatisticTest::resultTable(), Anova::run(), run(), setData(), tTest::setSample2(), ShapiroWilkTest::ShapiroWilkTest(), tTest::t(), Anova::twoWayANOVA(), ChiSquareTest::ucl(), and tTest::ucl().

## d_result_log

bool Statistics::d_result_log

protected

Flag specifying if the results should be displayed in the results log.

Referenced by run(), and showResultsLog().

## d_sd

double Statistics::d_sd

protected

Referenced by logInfo(), StatisticTest::outputResultsTo(), StatisticTest::resultTable(), setData(), tTest::setSample2(), standardDeviation(), and tTest::t().

## d_se

double Statistics::d_se

protected

Referenced by tTest::lcl(), logInfo(), StatisticTest::outputResultsTo(), StatisticTest::resultTable(), setData(), standardError(), and tTest::ucl().

## d_table

Table* Statistics::d_table

protected

A table source of data.

Referenced by ChiSquareTest::logInfo(), ShapiroWilkTest::logInfo(), tTest::logInfo(), Anova::logInfo(), and setData().

## d_variance

double Statistics::d_variance

protected

Referenced by ChiSquareTest::chiSquare(), ChiSquareTest::lcl(), logInfo(), StatisticTest::outputResultsTo(), StatisticTest::resultTable(), setData(), ChiSquareTest::ucl(), and variance().

The documentation for this class was generated from the following files:

- qtiplot/src/analysis/Statistics.h
- qtiplot/src/analysis/Statistics.cpp