Update.
[pspp-builds.git] / src / t-test.q
index 3baa983a11614813f47b42055f1c63c1f7f0ee01..4c4135ba732d97f4f5f75c095bd03c7a3bf8da54 100644 (file)
@@ -208,7 +208,7 @@ static  int mode;
 
 static struct cmd_t_test cmd;
 
-
+static int bad_weight_warn;
 
 int
 cmd_t_test(void)
@@ -296,6 +296,8 @@ cmd_t_test(void)
   else
     value_is_missing = is_missing;
 
+  bad_weight_warn = 1;
+
   multipass_procedure_with_splits (calculate, &cmd);
 
   n_pairs=0;
@@ -901,8 +903,8 @@ trbox_independent_samples_init(struct trbox *self,
   tab_text(self->t,10,2, TAB_CENTER | TAT_TITLE,_("Upper"));
 
   tab_joint_text(self->t, 9, 1, 10, 1, TAB_CENTER | TAT_PRINTF, 
-                _("%d%% Confidence Interval of the Difference"),
-                (int)round(cmd->criteria*100.0));
+                _("%g%% Confidence Interval of the Difference"),
+                cmd->criteria*100.0);
 
 }
 
@@ -1053,8 +1055,8 @@ trbox_paired_init(struct trbox *self,
   tab_vline(self->t,TAL_0,6,0,1);
 
   tab_joint_text(self->t, 5, 1, 6, 1, TAB_CENTER | TAT_PRINTF, 
-                _("%d%% Confidence Interval of the Difference"),
-                (int)round(cmd->criteria*100.0));
+                _("%g%% Confidence Interval of the Difference"),
+                cmd->criteria*100.0);
 
   tab_text (self->t, 2, 2, TAB_CENTER | TAT_TITLE, _("Mean"));
   tab_text (self->t, 3, 2, TAB_CENTER | TAT_TITLE, _("Std. Deviation"));
@@ -1148,8 +1150,8 @@ trbox_one_sample_init(struct trbox *self, struct cmd_t_test *cmd )
 
 
   tab_joint_text(self->t,5,1,6,1,TAB_CENTER  | TAT_PRINTF, 
-                _("%d%% Confidence Interval of the Difference"),
-                (int)round(cmd->criteria*100.0));
+                _("%g%% Confidence Interval of the Difference"),
+                cmd->criteria*100.0);
 
   tab_vline(self->t,TAL_0,6,1,1);
   tab_hline(self->t,TAL_1,5,6,2);
@@ -1303,7 +1305,7 @@ common_calc (const struct ccase *c, void *_cmd)
   int i;
   struct cmd_t_test *cmd = (struct cmd_t_test *)_cmd;  
 
-  double weight = dict_get_case_weight(default_dict,c);
+  double weight = dict_get_case_weight(default_dict,c,&bad_weight_warn);
 
 
   /* Skip the entire case if /MISSING=LISTWISE is set */
@@ -1403,7 +1405,7 @@ one_sample_calc (const struct ccase *c, void *cmd_)
   struct cmd_t_test *cmd = (struct cmd_t_test *)cmd_;
 
 
-  double weight = dict_get_case_weight(default_dict,c);
+  double weight = dict_get_case_weight(default_dict,c,&bad_weight_warn);
 
   /* Skip the entire case if /MISSING=LISTWISE is set */
   if ( cmd->miss == TTS_LISTWISE ) 
@@ -1512,7 +1514,7 @@ paired_calc (const struct ccase *c, void *cmd_)
 
   struct cmd_t_test *cmd  = (struct cmd_t_test *) cmd_;
 
-  double weight = dict_get_case_weight(default_dict,c);
+  double weight = dict_get_case_weight(default_dict,c,&bad_weight_warn);
 
   /* Skip the entire case if /MISSING=LISTWISE is set , 
    AND one member of a pair is missing */
@@ -1676,7 +1678,7 @@ group_calc (const struct ccase *c, struct cmd_t_test *cmd)
 
   const union value *gv = &c->data[indep_var->fv];
 
-  const double weight = dict_get_case_weight(default_dict,c);
+  const double weight = dict_get_case_weight(default_dict,c,&bad_weight_warn);
 
   if ( value_is_missing(gv,indep_var) )
     {