void gofw_WriteKS0 (long N, double DP, double DM, double D) /* Prints the results of a Kolmogorov-Smirnov test */ { printf ("\n\nKolmogorov-Smirnov+ statistic = D+ :"); gofw_Writep2 (DP, fbar_KSPlus (N, DP)); printf ("Kolmogorov-Smirnov- statistic = D- :"); gofw_Writep2 (DM, fbar_KSPlus (N, DM)); printf ("Kolmogorov-Smirnov statistic = D :"); gofw_Writep2 (D, fbar_KS1 (N, D)); printf ("\n\n"); }
static void WriteResultsDisc (long N, gofw_TestArray sVal2, gofw_TestArray pVal2, sres_Basic *res) { if (N > 1) { gofw_WriteActiveTests0 (N, sVal2, pVal2); swrite_NormalSumTest (N, res); printf ("Standardized empirical correlation :"); gofw_Writep2 (sVal2[gofw_Cor], pVal2[gofw_Cor]); } else { printf ("Standardized statistic value :"); gofw_Writep2 (sVal2[gofw_Mean], pVal2[gofw_Mean]); } }
void gofw_WriteActiveTests2 (long N, gofw_TestArray sVal, gofw_TestArray pVal, char S[]) { printf ("\n-----------------------------------------------\n"); if (N == 1) { gofw_Writep2 (sVal[gofw_Mean], pVal[gofw_Mean]); } else { gofw_WriteActiveTests0 (N, sVal, pVal); } }
static void WriteResultsDiscOver (sentrop_Res *res, double NLR, double Sum2, double SumSq, double Mu, double Sigma, double Mean, double Var, double Corr) { printf ("\nEmpirical mean :"); num_WriteD (Mean, 12, 8, 2); printf ("\nEmpirical variance :"); num_WriteD (Var, 12, 8, 2); printf ("\n"); Sum2 = Sum2; SumSq = SumSq; #ifndef STABLE if (swrite_Basic) { printf ("\nInformation on the numerical error in the computation\n" " of the variance and the correlation:\n" " Mean * Mean :"); num_WriteD (Mean * Mean, 20, 16, 2); printf ("\n Sum2 / N :"); num_WriteD (Sum2 / NLR, 20, 16, 2); printf ("\n SumSq / (N-1) :"); num_WriteD (SumSq / (NLR - 1.0), 20, 16, 2); printf ("\n\n"); } #endif if (Sigma > 0.0) { printf ("\nDeviation from the theoretical mean :"); num_WriteD (Mean - Mu, 12, 8, 2); printf ("\nStandardized standard deviation :"); gofw_Writep2 (res->Bas->sVal2[gofw_Mean], res->Bas->pVal2[gofw_Mean]); printf ("\n"); } else { printf ("\n\n"); } printf ("Empirical correlation :"); num_WriteD (Corr, 12, 8, 2); printf ("\nEmpirical correlation * sqrt(N) :"); gofw_Writep2 (res->Bas->sVal2[gofw_Cor], res->Bas->pVal2[gofw_Cor]); printf ("\n"); }
void gofw_WriteActiveTests0 (long N, gofw_TestArray sVal, gofw_TestArray pVal) { if (N == 1) { gofw_Writep1 (pVal[gofw_KSP]); return; } printf ("\n"); if (bitset_TestBit (gofw_ActiveTests, gofw_KSP)) { printf ("Kolmogorov-Smirnov+ statistic = D+ :"); gofw_Writep2 (sVal[gofw_KSP], pVal[gofw_KSP]); } if (bitset_TestBit (gofw_ActiveTests, gofw_KSM)) { printf ("Kolmogorov-Smirnov- statistic = D- :"); gofw_Writep2 (sVal[gofw_KSM], pVal[gofw_KSM]); } if (bitset_TestBit (gofw_ActiveTests, gofw_KS)) { printf ("Kolmogorov-Smirnov statistic = D :"); gofw_Writep2 (sVal[gofw_KS], pVal[gofw_KS]); } if (bitset_TestBit (gofw_ActiveTests, gofw_AD)) { printf ("Anderson-Darling statistic = A2 :"); gofw_Writep2 (sVal[gofw_AD], pVal[gofw_AD]); } if (bitset_TestBit (gofw_ActiveTests, gofw_CM)) { printf ("Cramer-von Mises statistic = W2 :"); gofw_Writep2 (sVal[gofw_CM], pVal[gofw_CM]); } if (bitset_TestBit (gofw_ActiveTests, gofw_WG)) { printf ("Watson statistic = G :"); gofw_Writep2 (sVal[gofw_WG], pVal[gofw_WG]); } if (bitset_TestBit (gofw_ActiveTests, gofw_WU)) { printf ("Watson statistic = U2 :"); gofw_Writep2 (sVal[gofw_WU], pVal[gofw_WU]); } }