ONEWAY /POSTHOC: Annotate output with dependent variable
[pspp] / src / math / trimmed-mean.c
index 5e48689626817ddf59ad46363a17e1d0e763084d..2d44d0dc08cc3bba114f4ed9004c17eaf9ae6a7f 100644 (file)
@@ -57,7 +57,7 @@ trimmed_mean_create (double W, double tail)
   struct statistic *stat = &os->parent;
 
   os->n_k = 2;
-  os->k = xcalloc (sizeof (*os->k), 2);
+  os->k = xcalloc (2, sizeof (*os->k));
 
   assert (tail >= 0);
   assert (tail <= 1);
@@ -81,8 +81,6 @@ trimmed_mean_calculate (const struct trimmed_mean *tm)
 {
   const struct order_stats *os = (const struct order_stats *) tm;
 
-  assert (os->cc == tm->w);
-
   return
     (
      (os->k[0].cc_p1 - os->k[0].tc) * os->k[0].y_p1