X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fstats%2Freliability.q;h=7eb20807ff645111b17353122a302ddcd431294f;hb=93268947fc32952b71f386e3dd1d3d1c6152203f;hp=0e8165a45858eb1e75655d85c2d25d14e666c2d9;hpb=c6fe58a22249f4f486b42f35fd8bd537c91e8e6e;p=pspp-builds.git diff --git a/src/language/stats/reliability.q b/src/language/stats/reliability.q index 0e8165a4..7eb20807 100644 --- a/src/language/stats/reliability.q +++ b/src/language/stats/reliability.q @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 2008, 2009 Free Software Foundation, Inc. + Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,25 +16,26 @@ #include -#include "xalloc.h" -#include "xmalloca.h" - -#include "gettext.h" -#define _(msgid) gettext (msgid) -#define N_(msgid) msgid +#include -#include +#include +#include +#include #include #include -#include -#include +#include +#include +#include #include -#include +#include +#include -#include +#include "xalloc.h" +#include "xmalloca.h" -#include -#include +#include "gettext.h" +#define _(msgid) gettext (msgid) +#define N_(msgid) msgid /* (headers) */ @@ -335,7 +336,7 @@ run_reliability (struct casereader *input, struct dataset *ds, struct cronbach *s = &rel->sc[si]; - s->totals_idx = casereader_get_value_cnt (input); + s->totals_idx = caseproto_get_n_widths (casereader_get_proto (input)); input = casereader_create_append_numeric (input, append_sum, s, NULL); @@ -378,18 +379,8 @@ run_reliability (struct casereader *input, struct dataset *ds, alpha (s->n_items, s->sum_of_variances, s->variance_of_sums); } - - { - struct tab_table *tab = tab_create(1, 1, 0); - - tab_dim (tab, tab_natural_dimensions, NULL); - tab_flags (tab, SOMF_NO_TITLE ); - - tab_text(tab, 0, 0, TAT_PRINTF, "Scale: %s", ds_cstr (&rel->scale_name)); - - tab_submit(tab); - } - + text_item_submit (text_item_create_format (TEXT_ITEM_PARAGRAPH, "Scale: %s", + ds_cstr (&rel->scale_name))); case_processing_summary (n_valid, n_missing, dataset_dict (ds)); } @@ -424,11 +415,9 @@ reliability_statistics (const struct reliability *rel) int heading_columns = rol[rel->model].heading_cols; int heading_rows = rol[rel->model].heading_rows; - struct tab_table *tbl = tab_create (n_cols, n_rows, 0); + struct tab_table *tbl = tab_create (n_cols, n_rows); tab_headers (tbl, heading_columns, 0, heading_rows, 0); - tab_dim (tbl, tab_natural_dimensions, NULL); - tab_title (tbl, _("Reliability Statistics")); /* Vertical lines for the data only */ @@ -467,11 +456,9 @@ reliability_summary_total (const struct reliability *rel) const int heading_rows = 1; const int n_rows = rel->sc[0].n_items + heading_rows ; - struct tab_table *tbl = tab_create (n_cols, n_rows, 0); + struct tab_table *tbl = tab_create (n_cols, n_rows); tab_headers (tbl, heading_columns, 0, heading_rows, 0); - tab_dim (tbl, tab_natural_dimensions, NULL); - tab_title (tbl, _("Item-Total Statistics")); /* Vertical lines for the data only */ @@ -556,7 +543,7 @@ reliability_statistics_model_alpha (struct tab_table *tbl, _("Cronbach's Alpha")); tab_text (tbl, 1, 0, TAB_CENTER | TAT_TITLE, - _("N of items")); + _("N of Items")); tab_double (tbl, 0, 1, TAB_RIGHT, s->alpha, NULL); @@ -677,11 +664,9 @@ case_processing_summary (casenumber n_valid, casenumber n_missing, int heading_columns = 2; int heading_rows = 1; struct tab_table *tbl; - tbl = tab_create (n_cols, n_rows, 0); + tbl = tab_create (n_cols, n_rows); tab_headers (tbl, heading_columns, 0, heading_rows, 0); - tab_dim (tbl, tab_natural_dimensions, NULL); - tab_title (tbl, _("Case Processing Summary")); /* Vertical lines for the data only */ @@ -719,8 +704,7 @@ case_processing_summary (casenumber n_valid, casenumber n_missing, tab_text (tbl, heading_columns, 0, TAB_CENTER | TAT_TITLE, _("N")); - tab_text (tbl, heading_columns + 1, 0, TAB_CENTER | TAT_TITLE | TAT_PRINTF, - _("%%")); + tab_text (tbl, heading_columns + 1, 0, TAB_CENTER | TAT_TITLE, _("%")); total = n_missing + n_valid;