Ignore:
Timestamp:
Mar 24, 2013, 9:39:45 AM (9 years ago)
Author:
Peter
Message:

refs #689. Deprecate PearsonCorrelation::p_value_one_sided. Replace it
with p_right and its friends p_left and p_value.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/statistics/PearsonCorrelation.h

    r2119 r3005  
    11#ifndef _theplu_yat_statistics_pearson_correlation_
    2 #define _theplu_yat_statistics_pearson_correlation_ 
     2#define _theplu_yat_statistics_pearson_correlation_
    33
    44// $Id$
     
    2828#include "AveragerPairWeighted.h"
    2929
     30#include "yat/utility/deprecate.h"
     31
    3032namespace theplu {
    3133namespace yat {
     
    3436  ///
    3537  /// @brief Class for calculating Pearson correlation.
    36   /// 
     38  ///
    3739  class PearsonCorrelation
    3840  {
     
    4244    ///
    4345    PearsonCorrelation(void);
    44    
     46
    4547    ///
    4648    /// @brief The destructor.
    4749    ///
    4850    virtual ~PearsonCorrelation(void);
    49    
    50    
     51
    5152    /**
    5253       Adding a data value to PearsonCorrelation.
     
    6263    */
    6364    double score(void) const;
    64    
     65
     66    /**
     67       \deprecated Provided for backward compatibility with the 0.10
     68       API. Use p_right(void).
     69    */
     70    double p_value_one_sided(void) const YAT_DEPRECATE;
     71
     72    /**
     73       Similar to p_right, but returns probability to get observed
     74       correlation or less.
     75
     76       \since New in yat 0.11
     77     */
     78    double p_left(void) const;
     79
    6580    /**
    6681       The p-value is the probability of getting a correlation as
    6782       large (or larger) as the observed value by random chance, when the true
    68        correlation is zero (and the data is Gaussian). 
    69        
     83       correlation is zero (and the data is Gaussian).
     84
    7085       P-value is calculated using function pearson_p_value(double,
    7186       unsigned int) where degrees of freedom is calculated using n(void) in
     
    7489       @return one-sided p-value
    7590
    76        \relates PearsonCorrelation
     91       \since New in yat 0.11
    7792    */
    78     double p_value_one_sided() const;
    79    
     93    double p_right(void) const;
     94
     95    /**
     96       Claculates the probability to get correlation greater than |r|
     97       or less than -|r|.
     98
     99       \return two-sided p-value
     100
     101       \since New in yat 0.11
     102     */
     103    double p_value(void) const;
     104
    80105  private:
    81106    AveragerPairWeighted ap_;
    82    
    83107  };
    84  
     108
    85109}}} // of namespace statistics, yat, and theplu
    86 
    87110#endif
Note: See TracChangeset for help on using the changeset viewer.