Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

RazorBack::Anova1_ Class Reference

#include <Anova1.hh>

Collaboration diagram for RazorBack::Anova1_:

Collaboration graph
[legend]
List of all members.

Public Types

enum  Sumidx_ { TOTAL = 0, BETWEEN = 1, WITHIN = 2 }
 Indexes the various ANOVA sums. More...


Public Methods

 Anova1_ ()
 Ctor: init to empty.

void clear ()
 Clears the calling object and prepares it for a new analysis.

template<class Initer_> void add_group (const string &Groupname, Initer_ First, Initer_ Last)
 Adds a group. More...

const vector<Group_>& groups () const
 Returns the vector of all groups (ie. all data points).

double sum_squares (Sumidx_ Idx) const
 Returns the sum of squares (Idx can be TOTAL, BETWEEN, WITHIN).

unsigned int degrees_freedom (Sumidx_ Idx) const
 Returns the degrees of freedom.

double mean_squares (Sumidx_ Idx) const
 Returns the mean of squares.

double f_ratio () const
 Returns the F-ratio (ratio of between/within mean squares).

vector<Anova1_::Group_>::const_iterator find_group (const string &Name) const
double omnibus_ftest () const
 Returns the significance level for the test that the between/within F ratio is larger than 1.0 (see f_ratio()). More...

double scheffe_test (vector< Group_ >::const_iterator G1, vector< Group_ >::const_iterator G2) const
 Returns the significance value that the two groups pointed to by G1, G2 have different means using the Scheffe test. More...

double scheffe_test (vector< Group_ >::const_iterator F1, vector< Group_ >::const_iterator L1, vector< Group_ >::const_iterator F2, vector< Group_ >::const_iterator L2) const
 Returns the significance value for the test that the two meta-groups of groups between [F1, L1) and [F2, L2) have different means according to the Scheffe procedure. More...

double scheffe_test (const vector< vector< Group_ >::const_iterator > &Metagroup1, const vector< vector< Group_ >::const_iterator > &Metagroup2) const
 Returns the significance value for the test that the two meta-groups of groups defined in the vectors of vector<Group_> iterators have different means according to the Scheffe procedure. More...

double tukey_atest (vector< Group_ >::const_iterator G1, vector< Group_ >::const_iterator G2) const
 Returns the significance value that the two pointed to by G1, G2 have different means using the Tukey A test. More...


Protected Methods

void update_sumsq (double Sx, double Sx2, unsigned int n)
double f_test (double Fratio) const
double q_test (double q) const

Private Attributes

vector<Group_Xgroups
vector<double> Sumsq
vector<double> Meansq
unsigned int Groupno
unsigned int Groupsize
unsigned int Ntotal
vector<unsigned int> Degfree
bool Equalgroups
double Sumx
double Sumx2
double Sumgroup

Member Enumeration Documentation

enum RazorBack::Anova1_::Sumidx_
 

Indexes the various ANOVA sums.

Enumeration values:
TOTAL  
BETWEEN  
WITHIN  

Definition at line 85 of file Anova1.hh.


Constructor & Destructor Documentation

RazorBack::Anova1_::Anova1_ ( ) [inline]
 

Ctor: init to empty.

Definition at line 101 of file Anova1.hh.


Member Function Documentation

void RazorBack::Anova1_::clear ( )
 

Clears the calling object and prepares it for a new analysis.

template<class Initer_>
void RazorBack::Anova1_::add_group ( const string & Groupname,
Initer_ First,
Initer_ Last ) [inline]
 

Adds a group.

The measurement data for the group are in the range [First, Last) (can come from any STL sequence). The name of the group is Groupname. Throws Toofewexc_ if [First, Last) does not specify a valid range with at least 1 data point.

Definition at line 117 of file Anova1.hh.

const vector< Group_ > & RazorBack::Anova1_::groups ( ) const [inline]
 

Returns the vector of all groups (ie. all data points).

Definition at line 146 of file Anova1.hh.

double RazorBack::Anova1_::sum_squares ( Sumidx_ Idx ) const [inline]
 

Returns the sum of squares (Idx can be TOTAL, BETWEEN, WITHIN).

Definition at line 149 of file Anova1.hh.

unsigned int RazorBack::Anova1_::degrees_freedom ( Sumidx_ Idx ) const [inline]
 

Returns the degrees of freedom.

Definition at line 152 of file Anova1.hh.

double RazorBack::Anova1_::mean_squares ( Sumidx_ Idx ) const [inline]
 

Returns the mean of squares.

Definition at line 155 of file Anova1.hh.

double RazorBack::Anova1_::f_ratio ( ) const [inline]
 

Returns the F-ratio (ratio of between/within mean squares).

Definition at line 158 of file Anova1.hh.

Referenced by omnibus_ftest().

vector<Anova1_::Group_>::const_iterator RazorBack::Anova1_::find_group ( const string & Name ) const
 

double RazorBack::Anova1_::omnibus_ftest ( ) const [inline]
 

Returns the significance level for the test that the between/within F ratio is larger than 1.0 (see f_ratio()).

If the value returned by f_test() is low, then the probability is large that f_ratio() is high, ie. that some of the group means are significantly different from some of the others ("omnibus F-test").

Definition at line 178 of file Anova1.hh.

double RazorBack::Anova1_::scheffe_test ( vector< Group_ >::const_iterator G1,
vector< Group_ >::const_iterator G2 ) const
 

Returns the significance value that the two groups pointed to by G1, G2 have different means using the Scheffe test.

A small returned value means that the means are significantly different.

double RazorBack::Anova1_::scheffe_test ( vector< Group_ >::const_iterator F1,
vector< Group_ >::const_iterator L1,
vector< Group_ >::const_iterator F2,
vector< Group_ >::const_iterator L2 ) const
 

Returns the significance value for the test that the two meta-groups of groups between [F1, L1) and [F2, L2) have different means according to the Scheffe procedure.

[F1,L1) and [F2,L2) are supposed to be valid ranges in the groups given to the Anova1_ object before. Currently, only continuous ranges are supported (not any combination of groups). A small returned value means that the means are significantly different.

double RazorBack::Anova1_::scheffe_test ( const vector< vector< Group_ >::const_iterator > & Metagroup1,
const vector< vector< Group_ >::const_iterator > & Metagroup2 ) const
 

Returns the significance value for the test that the two meta-groups of groups defined in the vectors of vector<Group_> iterators have different means according to the Scheffe procedure.

The iterators in Metagroup1,2 are supposed to be valid ranges in the groups given to the Anova1_ object before. A small returned value means that the means are significantly different.

double RazorBack::Anova1_::tukey_atest ( vector< Group_ >::const_iterator G1,
vector< Group_ >::const_iterator G2 ) const
 

Returns the significance value that the two pointed to by G1, G2 have different means using the Tukey A test.

A small returned value means that the means are significantly different.

void RazorBack::Anova1_::update_sumsq ( double Sx,
double Sx2,
unsigned int n ) [protected]
 

Referenced by add_group().

double RazorBack::Anova1_::f_test ( double Fratio ) const [protected]
 

Referenced by omnibus_ftest().

double RazorBack::Anova1_::q_test ( double q ) const [protected]
 


Member Data Documentation

vector<Group_> RazorBack::Anova1_::Xgroups [private]
 

Definition at line 90 of file Anova1.hh.

vector<double> RazorBack::Anova1_::Sumsq [private]
 

Definition at line 91 of file Anova1.hh.

vector<double> RazorBack::Anova1_::Meansq [private]
 

Definition at line 91 of file Anova1.hh.

unsigned int RazorBack::Anova1_::Groupno [private]
 

Definition at line 92 of file Anova1.hh.

unsigned int RazorBack::Anova1_::Groupsize [private]
 

Definition at line 92 of file Anova1.hh.

unsigned int RazorBack::Anova1_::Ntotal [private]
 

Definition at line 92 of file Anova1.hh.

vector<unsigned int> RazorBack::Anova1_::Degfree [private]
 

Definition at line 93 of file Anova1.hh.

bool RazorBack::Anova1_::Equalgroups [private]
 

Definition at line 94 of file Anova1.hh.

double RazorBack::Anova1_::Sumx [private]
 

Definition at line 95 of file Anova1.hh.

double RazorBack::Anova1_::Sumx2 [private]
 

Definition at line 95 of file Anova1.hh.

double RazorBack::Anova1_::Sumgroup [private]
 

Definition at line 95 of file Anova1.hh.


The documentation for this class was generated from the following file:
Generated at Wed Aug 21 09:33:15 2002 for The Razorback C++ Library: Statistics by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001