X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fstats%2Fks-one-sample.c;h=d571693cd8cce5da80e6cfcd1044e6e8477024c9;hb=ab7933960a09a9e1d3ca9a119e11b92a7cff6769;hp=a4a2792f7eb0fd1b4ec2225de16bd76ac7b6aa5f;hpb=4010cd95ae15efa542a324c4c2081b19ab10b902;p=pspp diff --git a/src/language/stats/ks-one-sample.c b/src/language/stats/ks-one-sample.c index a4a2792f7e..d571693cd8 100644 --- a/src/language/stats/ks-one-sample.c +++ b/src/language/stats/ks-one-sample.c @@ -145,7 +145,7 @@ ks_one_sample_execute (const struct dataset *ds, int v; struct casereader *r = casereader_clone (input); - struct ks *ks = xcalloc (sizeof *ks, ost->n_vars); + struct ks *ks = xcalloc (ost->n_vars, sizeof *ks); for (v = 0; v < ost->n_vars; ++v) { @@ -276,7 +276,7 @@ show_results (const struct ks *ks, const int nc = kst->parent.n_vars + column_headers; const int nr = 8 + row_headers; struct tab_table *table = tab_create (nc, nr); - + tab_set_format (table, RC_WEIGHT, wfmt); tab_headers (table, row_headers, 0, column_headers, 0); tab_title (table, _("One-Sample Kolmogorov-Smirnov Test")); @@ -344,21 +344,21 @@ show_results (const struct ks *ks, switch (kst->dist) { case KS_UNIFORM: - tab_double (table, col, 1, 0, ks[i].obs_cc, wfmt); - tab_double (table, col, 2, 0, ks[i].test_min, NULL); - tab_double (table, col, 3, 0, ks[i].test_max, NULL); + tab_double (table, col, 1, 0, ks[i].obs_cc, NULL, RC_WEIGHT); + tab_double (table, col, 2, 0, ks[i].test_min, NULL, RC_OTHER); + tab_double (table, col, 3, 0, ks[i].test_max, NULL, RC_OTHER); break; case KS_NORMAL: - tab_double (table, col, 1, 0, ks[i].obs_cc, wfmt); - tab_double (table, col, 2, 0, ks[i].mu, NULL); - tab_double (table, col, 3, 0, ks[i].sigma, NULL); + tab_double (table, col, 1, 0, ks[i].obs_cc, NULL, RC_WEIGHT); + tab_double (table, col, 2, 0, ks[i].mu, NULL, RC_OTHER); + tab_double (table, col, 3, 0, ks[i].sigma, NULL, RC_OTHER); break; case KS_POISSON: case KS_EXPONENTIAL: - tab_double (table, col, 1, 0, ks[i].obs_cc, wfmt); - tab_double (table, col, 2, 0, ks[i].mu, NULL); + tab_double (table, col, 1, 0, ks[i].obs_cc, NULL, RC_WEIGHT); + tab_double (table, col, 2, 0, ks[i].mu, NULL, RC_OTHER); break; default: @@ -370,13 +370,13 @@ show_results (const struct ks *ks, z = sqrt (ks[i].obs_cc) * abs; - tab_double (table, col, 5, 0, ks[i].diff_pos, NULL); - tab_double (table, col, 6, 0, ks[i].diff_neg, NULL); + tab_double (table, col, 5, 0, ks[i].diff_pos, NULL, RC_OTHER); + tab_double (table, col, 6, 0, ks[i].diff_neg, NULL, RC_OTHER); - tab_double (table, col, 4, 0, abs, NULL); + tab_double (table, col, 4, 0, abs, NULL, RC_OTHER); - tab_double (table, col, 7, 0, z, NULL); - tab_double (table, col, 8, 0, ks_asymp_sig (z), NULL); + tab_double (table, col, 7, 0, z, NULL, RC_OTHER); + tab_double (table, col, 8, 0, ks_asymp_sig (z), NULL, RC_PVALUE); }