18#ifndef MS_QUANT_STATS_HPP
19#define MS_QUANT_STATS_HPP
26namespace matrix_science {
48 static void detectOutliers(
const std::vector<double> &sample, std::string outlierMethod,
unsigned int *
const numLow,
unsigned int *
const numHigh);
51 static void detectOutliers(
const std::vector<double> &sample, std::string outlierMethod,
double sigLevel,
unsigned int *
const numLow,
unsigned int *
const numHigh);
54 static void testRosners(
const std::vector<double> &sample,
unsigned int maxOutliers,
double sigLevel,
unsigned int *
const numLow,
unsigned int *
const numHigh);
56 static void detectOutliers(
const std::vector<double> &sample, std::string outlierMethod,
unsigned int *
const OUTPUT,
unsigned int *
const OUTPUT);
57 static void detectOutliers(
const std::vector<double> &sample, std::string outlierMethod,
double sigLevel,
unsigned int *
const OUTPUT,
unsigned int *
const OUTPUT);
58 static void testRosners(
const std::vector<double> &sample,
unsigned int maxOutliers,
double sigLevel,
unsigned int *
const OUTPUT,
unsigned int *
const OUTPUT);
62 static int testDixonsN9(
unsigned long sampleSize,
double min,
double x2,
double xn_1,
double max,
double sigLevel);
65 static int testGrubbsN2(
unsigned long sampleSize,
double min,
double mean,
double max,
double stdev,
double sigLevel);
68 static bool testShapiroWilkW(
const std::vector<double> &sample,
double *
const W,
double *
const pValue);
70 static bool testShapiroWilkW(
const std::vector<double> &sample,
double *
const OUTPUT,
double *
const OUTPUT);
73 static double binomialCoefficient(
unsigned int n,
unsigned int k);
76 static double sum(
const std::vector<double> &data);
79 static double sumsq(
const std::vector<double> &data);
82 static std::vector<double> meanCentre(
const std::vector<double> &data,
double mean);
85 static std::vector<double> logTransform(
const std::vector<double> &data);
88 static std::vector<double> expTransform(
const std::vector<double> &logData);
91 static double sortedMedian(
const std::vector<double> &data);
94 static double sortedMedian(
const std::deque<double> &data);
97 static double unsortedMedian(
const std::vector<double> &data);
100 static double arithmeticMean(
const std::vector<double> &data);
103 static double weightedArithmeticMean(
const std::vector<double> &data,
const std::vector<double> &weights);
106 static double geometricMean(
const std::vector<double> &data);
109 static double weightedGeometricMean(
const std::vector<double> &data,
const std::vector<double> &weights);
112 static double arithmeticStandardDeviation(
const std::vector<double> &data,
double arithmeticMean);
115 static double arithmeticStandardErrorOfMean(
double arithmeticStdev,
unsigned long sampleSize);
118 static double geometricStandardDeviation(
const std::vector<double> &data,
double geometricMean);
121 static double arithmeticStandardErrorOfMedian(
double arithmeticStdev,
unsigned long sampleSize);
124 static double weightedArithmeticStandardDeviation(
const std::vector<double> &data,
const std::vector<double> &weights,
double weightedMean);
127 static double weightedArithmeticStandardError(
const std::vector<double> &weights,
double weightedStdev,
unsigned long sampleSize);
130 static double weightedGeometricStandardDeviation(
const std::vector<double> &data,
const std::vector<double> &weights,
double weightedMean);
133 static double normalCumulativeProbability(
double x0);
136 static double normalCriticalValue(
double p);
139 static double studentsCriticalValue(
unsigned int df,
double sigLevel);
142 static double chisqUpperCriticalValue(
unsigned int df,
double sigLevel);
145 static double chisqLowerCriticalValue(
unsigned int df,
double sigLevel);
148 static double snedecorsCriticalValue(
unsigned int df1,
unsigned int df2,
double sigLevel);
151 static double calculateNormalMeanPvalue(
double populationMean,
double mean,
double stdev,
unsigned long sampleSize);
154 static double calculateNormalMedianPvalue(
double populationMedian,
double median,
double stdev,
unsigned long sampleSize);
157 static double calculateNormalWeightedPvalue(
double populationMean,
double weightedMean,
const std::vector<double> &weights,
double weightedStdev,
unsigned long sampleSize);
160 static double medianStandardErrorCorrection(
unsigned long sampleSize);
163 static double poissonDensity(
double lambda,
unsigned int k);
Mathematical and statistical routines for peptide and protein quantitation.
Definition: ms_quant_stats.hpp:44