# Changeset 295 for trunk/lib/statistics/Fisher.h

Ignore:
Timestamp:
Apr 29, 2005, 11:15:58 AM (17 years ago)
Message:

file structure modifications. NOTE, this revision is not working, please wait for the next...

Location:
trunk/lib
Files:
 r294 // $Id$ #ifndef _theplu_cpptools_fisher_ #define _theplu_cpptools_fisher_ #ifndef _theplu_statistics_fisher_ #define _theplu_statistics_fisher_ // C++ tools include ///////////////////// #include "Score.h" #include "vector.h" //#include #include #include // Standard C++ includes //////////////////////// //#include //#include namespace theplu { namespace cpptools { namespace statistics { /// /// Class for Fisher's exact test. /// /// Function calculating score from 2x2 table for which the /// elements are calculated as follows \n /// a: #data \f$x=1 \f$ AND \f$y=1 \f$ \n /// b: #data \f$x=-1 \f$ AND \f$y=1 \f$ \n /// c: #data \f$x=1 \f$ AND \f$y=-1 \f$ \n /// d: #data \f$x=-1 \f$ AND \f$y=1 \f$ \n /// /// @return odds ratio. If absolute_ is true and odds ratio is /// less than unity 1 divided by odds ratio is returned /// double score(const gslapi::vector&, const gslapi::vector&, double score(const gslapi::vector& x, const gslapi::vector& y, const std::vector& = std::vector()); /// /// Weighted version of odds ratio. Each element in 2x2 table is /// calculated as \f$\sum weight_i \f$, so when each weight is /// Weighted version of score. Each element in 2x2 table is /// calculated as \f$\sum w_i \f$, so when each weight is /// unitary the same table is created as in the unweighted version /// @return odds ratio /// double score(const gslapi::vector&, const gslapi::vector&, const gslapi::vector&, double score(const gslapi::vector& x, const gslapi::vector& y, const gslapi::vector& w, const std::vector& = std::vector()); /// /// @return odds ratio  \f$ad/bc\f$ /// \f$\frac{ad}{bc} \f$ /// double score(const u_int, const u_int, const u_int, const u_int); /// @return odds ratio. If absolute_ is true and odds ratio is /// less than unity, 1 divided by odds ratio is returned /// double score(const u_int a, const u_int b, const u_int c, const u_int d); double oddsratio(const double, const double, const double, const double) const; u_int d_; double oddsratio(const double a, const double b, const double c, const double d) const; }; }} // of namespace cpptools and namespace theplu }} // of namespace statistics and namespace theplu #endif