X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fstats%2Fregression.q;fp=src%2Flanguage%2Fstats%2Fregression.q;h=c7e8179a579086620064f53e0bd6bb5eace213ce;hb=f550aee00a62fe1d8baf62d83cd7efef6cc2ee92;hp=c27d8a40a7e1eb0314d5d8c088d86ec5988d88c1;hpb=56c42d61d46aea9d13dcf55e9e2252805282570b;p=pspp-builds.git diff --git a/src/language/stats/regression.q b/src/language/stats/regression.q index c27d8a40..c7e8179a 100644 --- a/src/language/stats/regression.q +++ b/src/language/stats/regression.q @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -41,7 +40,7 @@ #include #include #include -#include +#include #include "xalloc.h" @@ -147,8 +146,7 @@ reg_stats_r (linreg *c, void *aux UNUSED) rsq = linreg_ssreg (c) / linreg_sst (c); adjrsq = 1.0 - (1.0 - rsq) * (linreg_n_obs (c) - 1.0) / (linreg_n_obs (c) - linreg_n_coeffs (c)); std_error = sqrt (linreg_mse (c)); - t = tab_create (n_cols, n_rows, 0); - tab_dim (t, tab_natural_dimensions, NULL); + t = tab_create (n_cols, n_rows); tab_box (t, TAL_2, TAL_2, -1, TAL_1, 0, 0, n_cols - 1, n_rows - 1); tab_hline (t, TAL_2, 0, n_cols - 1, 1); tab_vline (t, TAL_2, 2, 0, n_rows - 1); @@ -184,14 +182,13 @@ reg_stats_coeff (linreg * c, void *aux_) const struct variable *v; struct tab_table *t; + gsl_matrix *cov = aux_; assert (c != NULL); - gsl_matrix *cov = (gsl_matrix *) aux_; n_rows = linreg_n_coeffs (c) + 3; - t = tab_create (n_cols, n_rows, 0); + t = tab_create (n_cols, n_rows); tab_headers (t, 2, 0, 1, 0); - tab_dim (t, tab_natural_dimensions, NULL); tab_box (t, TAL_2, TAL_2, -1, TAL_1, 0, 0, n_cols - 1, n_rows - 1); tab_hline (t, TAL_2, 0, n_cols - 1, 1); tab_vline (t, TAL_2, 2, 0, n_rows - 1); @@ -274,9 +271,8 @@ reg_stats_anova (linreg * c, void *aux UNUSED) struct tab_table *t; assert (c != NULL); - t = tab_create (n_cols, n_rows, 0); + t = tab_create (n_cols, n_rows); tab_headers (t, 2, 0, 1, 0); - tab_dim (t, tab_natural_dimensions, NULL); tab_box (t, TAL_2, TAL_2, -1, TAL_1, 0, 0, n_cols - 1, n_rows - 1); @@ -365,9 +361,8 @@ reg_stats_bcov (linreg * c, void *aux UNUSED) assert (c != NULL); n_cols = c->n_indeps + 1 + 2; n_rows = 2 * (c->n_indeps + 1); - t = tab_create (n_cols, n_rows, 0); + t = tab_create (n_cols, n_rows); tab_headers (t, 2, 0, 1, 0); - tab_dim (t, tab_natural_dimensions, NULL); tab_box (t, TAL_2, TAL_2, -1, TAL_1, 0, 0, n_cols - 1, n_rows - 1); tab_hline (t, TAL_2, 0, n_cols - 1, 1); tab_vline (t, TAL_2, 2, 0, n_rows - 1);