1 #ifndef COMPWA_TOOLS_GOF_HPP_ 2 #define COMPWA_TOOLS_GOF_HPP_ 11 inline double calculateAIC(
double LH,
int sampleSize,
int nFreePar) {
13 double aic = 2.0 * LH + 2.0 * nFreePar;
15 aic += 2.0 * (nFreePar * nFreePar + nFreePar) / (sampleSize - nFreePar - 1);
24 inline double calculateBIC(
double LH,
int sampleSize,
int nFreePar) {
25 return std::log(sampleSize) * nFreePar + 2.0 * LH;
double calculateBIC(double LH, int sampleSize, int nFreePar)
Calculate Beyesian Information Criterium BIC https://en.wikipedia.org/wiki/Bayesian_information_crite...
double calculateAIC(double LH, int sampleSize, int nFreePar)
Calculate Akaike Information Criterium AICc https://en.wikipedia.org/wiki/Akaike_information_criterio...