npstat is hosted by Hepforge, IPPP Durham
NPStat  5.10.0
npstat::AbsSmoothGOFTest1D Class Referenceabstract
Inheritance diagram for npstat::AbsSmoothGOFTest1D:
npstat::AbsUnbinnedGOFTest1D npstat::SineGOFTest1D npstat::SmoothCDGOFTest1D npstat::SmoothGOFTest1D< Poly > npstat::Trig2GOFTest1D

Public Member Functions

 AbsSmoothGOFTest1D (const AbsDistribution1D &distro, unsigned maxdeg, const unsigned char *mask, unsigned lenMask)
 
 AbsSmoothGOFTest1D (const AbsDistribution1D &distro, const std::vector< int > &mask)
 
unsigned maxDegree () const
 
unsigned nDegreesUsed () const
 
bool isDegreeUsed (const unsigned n) const
 
virtual double testStatistic (const double *data, unsigned long sz, bool isDataSorted) const
 
virtual double testStatistic (const float *data, unsigned long sz, bool isDataSorted) const
 
virtual bool hasAnalyticPValue () const
 
virtual double analyticPValue (double stat, unsigned long sz) const
 
virtual double inverseExceedance (double pvalue, unsigned long sz, double statMin, double statMax) const
 
virtual unsigned normalizedDeviations (const double *data, unsigned long sz, bool isDataSorted, double *deviations, unsigned lenDeviations) const =0
 
virtual unsigned normalizedDeviations (const float *data, unsigned long sz, bool isDataSorted, double *deviations, unsigned lenDeviations) const =0
 
virtual double directedStatistic (const double *direction, unsigned lenDirection, const double *data, unsigned long sz, bool isDataSorted) const
 
virtual double directedStatistic (const double *direction, unsigned lenDirection, const float *data, unsigned long sz, bool isDataSorted) const
 
void simulateDirectedStatistic (const double *direction, unsigned lenDirection, AbsRandomGenerator &g, unsigned long sz, unsigned nPseudo, std::vector< double > *stats) const
 
virtual void simulateAltDirectedStatistic (const double *direction, unsigned lenDirection, const AbsDistribution1D &alternative, AbsRandomGenerator &g, unsigned long sz, unsigned nPseudo, std::vector< double > *stats) const
 
- Public Member Functions inherited from npstat::AbsUnbinnedGOFTest1D
 AbsUnbinnedGOFTest1D (const AbsDistribution1D &d)
 
 AbsUnbinnedGOFTest1D (const AbsUnbinnedGOFTest1D &r)
 
AbsUnbinnedGOFTest1Doperator= (const AbsUnbinnedGOFTest1D &r)
 
const AbsDistribution1DgetNull () const
 
virtual std::string shortName () const =0
 
void simulateStatistic (AbsRandomGenerator &g, unsigned long sz, unsigned nPseudo, std::vector< double > *stats) const
 
virtual void simulateAltStatistic (const AbsDistribution1D &alternative, AbsRandomGenerator &g, unsigned long sz, unsigned nPseudo, std::vector< double > *stats) const
 

Protected Member Functions

std::string testNameWithMask (const char *prefix) const
 

Protected Attributes

std::vector< unsigned char > mask_
 
unsigned maxdeg_
 
unsigned nUnmasked_
 
- Protected Attributes inherited from npstat::AbsUnbinnedGOFTest1D
AbsDistribution1Ddistro_
 

Member Function Documentation

◆ analyticPValue()

virtual double npstat::AbsSmoothGOFTest1D::analyticPValue ( double  stat,
unsigned long  sz 
) const
virtual

p-value calculated by this method is valid asymptotically for the statistic returned by the "testStatistic" method, not "directedStatistic".

Reimplemented from npstat::AbsUnbinnedGOFTest1D.

◆ directedStatistic()

virtual double npstat::AbsSmoothGOFTest1D::directedStatistic ( const double *  direction,
unsigned  lenDirection,
const double *  data,
unsigned long  sz,
bool  isDataSorted 
) const
inlinevirtual

It is expected that the asymptotic distribution of the directed test statistic for the null hypothesis is the standard normal.

◆ inverseExceedance()

virtual double npstat::AbsSmoothGOFTest1D::inverseExceedance ( double  pvalue,
unsigned long  sz,
double  smin,
double  smax 
) const
virtual

This is the inverse function to "analyticPValue"

Reimplemented from npstat::AbsUnbinnedGOFTest1D.

◆ normalizedDeviations()

virtual unsigned npstat::AbsSmoothGOFTest1D::normalizedDeviations ( const double *  data,
unsigned long  sz,
bool  isDataSorted,
double *  deviations,
unsigned  lenDeviations 
) const
pure virtual

Get individual normalized deviations from which the test statistics are constructed. Only unmasked deviations are returned. The return value of this function is the number of such deviations.

Implemented in npstat::Trig2GOFTest1D, npstat::SmoothGOFTest1D< Poly >, npstat::SmoothCDGOFTest1D, and npstat::SineGOFTest1D.


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