CTABLES comments
authorBen Pfaff <blp@cs.stanford.edu>
Sat, 4 Jun 2022 23:06:20 +0000 (16:06 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Sat, 25 Jun 2022 04:19:07 +0000 (21:19 -0700)
src/language/stats/ctables.c
tests/language/stats/ctables.at

index 5eb4bb4a3d1394c9028b1bfadf187b8556db737e..fe46f10c9254cb8e556ff045e24792503af5771c 100644 (file)
@@ -2231,6 +2231,24 @@ ctables_summary_add (union ctables_summary *s,
                      const struct variable *var, const union value *value,
                      double d_weight, double e_weight)
 {
+  /* To determine whether a case is included in a given table for a particular
+     kind of summary, consider the following charts for each variable in the
+     table.  Only if "yes" appears for every variable for the summary is the
+     case counted.
+
+     Categorical variables:                    VALIDN   COUNT   TOTALN
+       Valid values in included categories       yes     yes      yes
+       Missing values in included categories     ---     yes      yes
+       Missing values in excluded categories     ---     ---      yes
+       Valid values in excluded categories       ---     ---      ---
+
+     Scale variables:                          VALIDN   COUNT   TOTALN
+       Valid value                               yes     yes      yes
+       Missing value                             ---     yes      yes
+
+     Missing values include both user- and system-missing.  (The system-missing
+     value is always in an excluded category.)
+  */
   switch (ss->function)
     {
     case CTSF_COUNT:
index 461a62220b8b639c1b2bea72d1dbaca8e18d8c45..9d58441d881d39761c6451b8b998bf44a0299d0d 100644 (file)
@@ -12,7 +12,6 @@ dnl   * Unimplemented ones.
 dnl   * U-prefix for unweighted summaries.
 dnl   * .LCL and .UCL suffixes.
 dnl   * .SE suffixes.
-dnl   * Separate summary functions for totals and subtotals.
 dnl - CATEGORIES:
 dnl   * String values
 dnl   * Date values
@@ -36,6 +35,8 @@ dnl - test CLABELS ROWLABELS=LAYER.
 dnl - Test VLABELS.
 dnl - Test WEIGHT and adjustment weights.
 dnl - Test PCOMPUTE and PPROPERTIES.
+dnl - Summary functions:
+dnl   * Separate summary functions for totals and subtotals.
 dnl - CATEGORIES:
 dnl   * THRU
 dnl   * OTHERNM