S(CTSF_LAYERROWPCT_TOTALN, "LAYERROWPCT.TOTALN", N_("Layer Row Total N %"), CTF_PERCENT, CTFA_ALL) \
S(CTSF_LAYERCOLPCT_TOTALN, "LAYERCOLPCT.TOTALN", N_("Layer Column Total N %"), CTF_PERCENT, CTFA_ALL) \
\
+ /* All variables (unweighted.) */ \
+ S(CTSF_UCOUNT, "UCOUNT", N_("Unweighted Count"), CTF_COUNT, CTFA_ALL) \
+ S(CTSF_UROWPCT_COUNT, "UROWPCT.COUNT", N_("Unweighted Row %"), CTF_PERCENT, CTFA_ALL) \
+ S(CTSF_UCOLPCT_COUNT, "UCOLPCT.COUNT", N_("Unweighted Column %"), CTF_PERCENT, CTFA_ALL) \
+ S(CTSF_UTABLEPCT_COUNT, "UTABLEPCT.COUNT", N_("Unweighted Table %"), CTF_PERCENT, CTFA_ALL) \
+ S(CTSF_USUBTABLEPCT_COUNT, "USUBTABLEPCT.COUNT", N_("Unweighted Subtable %"), CTF_PERCENT, CTFA_ALL) \
+ S(CTSF_ULAYERPCT_COUNT, "ULAYERPCT.COUNT", N_("Unweighted Layer %"), CTF_PERCENT, CTFA_ALL) \
+ S(CTSF_ULAYERROWPCT_COUNT, "ULAYERROWPCT.COUNT", N_("Unweighted Layer Row %"), CTF_PERCENT, CTFA_ALL) \
+ S(CTSF_ULAYERCOLPCT_COUNT, "ULAYERCOLPCT.COUNT", N_("Unweighted Layer Column %"), CTF_PERCENT, CTFA_ALL) \
+ S(CTSF_UROWPCT_VALIDN, "UROWPCT.VALIDN", N_("Unweighted Row Valid N %"), CTF_PERCENT, CTFA_ALL) \
+ S(CTSF_UCOLPCT_VALIDN, "UCOLPCT.VALIDN", N_("Unweighted Column Valid N %"), CTF_PERCENT, CTFA_ALL) \
+ S(CTSF_UTABLEPCT_VALIDN, "UTABLEPCT.VALIDN", N_("Unweighted Table Valid N %"), CTF_PERCENT, CTFA_ALL) \
+ S(CTSF_USUBTABLEPCT_VALIDN, "USUBTABLEPCT.VALIDN", N_("Unweighted Subtable Valid N %"), CTF_PERCENT, CTFA_ALL) \
+ S(CTSF_ULAYERPCT_VALIDN, "ULAYERPCT.VALIDN", N_("Unweighted Layer Valid N %"), CTF_PERCENT, CTFA_ALL) \
+ S(CTSF_ULAYERROWPCT_VALIDN, "ULAYERROWPCT.VALIDN", N_("Unweighted Layer Row Valid N %"), CTF_PERCENT, CTFA_ALL) \
+ S(CTSF_ULAYERCOLPCT_VALIDN, "ULAYERCOLPCT.VALIDN", N_("Unweighted Layer Column Valid N %"), CTF_PERCENT, CTFA_ALL) \
+ S(CTSF_UROWPCT_TOTALN, "UROWPCT.TOTALN", N_("Unweighted Row Total N %"), CTF_PERCENT, CTFA_ALL) \
+ S(CTSF_UCOLPCT_TOTALN, "UCOLPCT.TOTALN", N_("Unweighted Column Total N %"), CTF_PERCENT, CTFA_ALL) \
+ S(CTSF_UTABLEPCT_TOTALN, "UTABLEPCT.TOTALN", N_("Unweighted Table Total N %"), CTF_PERCENT, CTFA_ALL) \
+ S(CTSF_USUBTABLEPCT_TOTALN, "USUBTABLEPCT.TOTALN", N_("Unweighted Subtable Total N %"), CTF_PERCENT, CTFA_ALL) \
+ S(CTSF_ULAYERPCT_TOTALN, "ULAYERPCT.TOTALN", N_("Unweighted Layer Total N %"), CTF_PERCENT, CTFA_ALL) \
+ S(CTSF_ULAYERROWPCT_TOTALN, "ULAYERROWPCT.TOTALN", N_("Unweighted Layer Row Total N %"), CTF_PERCENT, CTFA_ALL) \
+ S(CTSF_ULAYERCOLPCT_TOTALN, "ULAYERCOLPCT.TOTALN", N_("Unweighted Layer Column Total N %"), CTF_PERCENT, CTFA_ALL) \
+ \
/* Scale variables, totals, and subtotals. */ \
S(CTSF_MAXIMUM, "MAXIMUM", N_("Maximum"), CTF_GENERAL, CTFA_SCALE) \
S(CTSF_MEAN, "MEAN", N_("Mean"), CTF_GENERAL, CTFA_SCALE) \
S(CTSF_LAYERPCT_SUM, "LAYERPCT.SUM", N_("Layer Sum %"), CTF_PERCENT, CTFA_SCALE) \
S(CTSF_LAYERROWPCT_SUM, "LAYERROWPCT.SUM", N_("Layer Row Sum %"), CTF_PERCENT, CTFA_SCALE) \
S(CTSF_LAYERCOLPCT_SUM, "LAYERCOLPCT.SUM", N_("Layer Column Sum %"), CTF_PERCENT, CTFA_SCALE) \
+ \
+ /* Scale variables, totals, and subtotals (unweighted). */ \
+ S(CTSF_UMEAN, "UMEAN", N_("Unweighted Mean"), CTF_GENERAL, CTFA_SCALE) \
+ S(CTSF_UMEDIAN, "UMEDIAN", N_("Unweighted Median"), CTF_GENERAL, CTFA_SCALE) \
+ S(CTSF_UMISSING, "UMISSING", N_("Unweighted Missing"), CTF_GENERAL, CTFA_SCALE) \
+ S(CTSF_UMODE, "UMODE", N_("Unweighted Mode"), CTF_GENERAL, CTFA_SCALE) \
+ S(CTSF_UPTILE, "UPTILE", N_("Unweighted Percentile"), CTF_GENERAL, CTFA_SCALE) \
+ S(CTSF_USEMEAN, "USEMEAN", N_("Unweighted Std Error of Mean"), CTF_GENERAL, CTFA_SCALE) \
+ S(CTSF_USTDDEV, "USTDDEV", N_("Unweighted Std Deviation"), CTF_GENERAL, CTFA_SCALE) \
+ S(CTSF_USUM, "USUM", N_("Unweighted Sum"), CTF_GENERAL, CTFA_SCALE) \
+ S(CSTF_UTOTALN, "UTOTALN", N_("Unweighted Total N"), CTF_COUNT, CTFA_SCALE) \
+ S(CTSF_UVALIDN, "UVALIDN", N_("Unweighted Valid N"), CTF_COUNT, CTFA_SCALE) \
+ S(CTSF_UVARIANCE, "UVARIANCE", N_("Unweighted Variance"), CTF_GENERAL, CTFA_SCALE) \
+ S(CTSF_UROWPCT_SUM, "UROWPCT.SUM", N_("Unweighted Row Sum %"), CTF_PERCENT, CTFA_SCALE) \
+ S(CTSF_UCOLPCT_SUM, "UCOLPCT.SUM", N_("Unweighted Column Sum %"), CTF_PERCENT, CTFA_SCALE) \
+ S(CTSF_UTABLEPCT_SUM, "UTABLEPCT.SUM", N_("Unweighted Table Sum %"), CTF_PERCENT, CTFA_SCALE) \
+ S(CTSF_USUBTABLEPCT_SUM, "USUBTABLEPCT.SUM", N_("Unweighted Subtable Sum %"), CTF_PERCENT, CTFA_SCALE) \
+ S(CTSF_ULAYERPCT_SUM, "ULAYERPCT.SUM", N_("Unweighted Layer Sum %"), CTF_PERCENT, CTFA_SCALE) \
+ S(CTSF_ULAYERROWPCT_SUM, "ULAYERROWPCT.SUM", N_("Unweighted Layer Row Sum %"), CTF_PERCENT, CTFA_SCALE) \
+ S(CTSF_ULAYERCOLPCT_SUM, "ULAYERCOLPCT.SUM", N_("Unweighted Layer Column Sum %"), CTF_PERCENT, CTFA_SCALE) \
#if 0 /* Multiple response sets not yet implemented. */
S(CTSF_RESPONSES, "RESPONSES", N_("Responses"), CTF_COUNT, CTFA_MRSETS) \
double e_valid; /* Effective weight */
double e_count;
double e_total;
+ double u_valid; /* Unweighted. */
+ double u_count;
+ double u_total;
};
enum ctables_summary_variant
case CTSF_LAYERPCT_COUNT:
case CTSF_LAYERROWPCT_COUNT:
case CTSF_LAYERCOLPCT_COUNT:
+ case CTSF_UCOUNT:
+ case CTSF_UROWPCT_COUNT:
+ case CTSF_UCOLPCT_COUNT:
+ case CTSF_UTABLEPCT_COUNT:
+ case CTSF_USUBTABLEPCT_COUNT:
+ case CTSF_ULAYERPCT_COUNT:
+ case CTSF_ULAYERROWPCT_COUNT:
+ case CTSF_ULAYERCOLPCT_COUNT:
return true;
case CTSF_ROWPCT_VALIDN:
case CTSF_LAYERPCT_SUM:
case CTSF_LAYERROWPCT_SUM:
case CTSF_LAYERCOLPCT_SUM:
+ case CTSF_UROWPCT_VALIDN:
+ case CTSF_UCOLPCT_VALIDN:
+ case CTSF_UTABLEPCT_VALIDN:
+ case CTSF_USUBTABLEPCT_VALIDN:
+ case CTSF_ULAYERPCT_VALIDN:
+ case CTSF_ULAYERROWPCT_VALIDN:
+ case CTSF_ULAYERCOLPCT_VALIDN:
+ case CTSF_UROWPCT_TOTALN:
+ case CTSF_UCOLPCT_TOTALN:
+ case CTSF_UTABLEPCT_TOTALN:
+ case CTSF_USUBTABLEPCT_TOTALN:
+ case CTSF_ULAYERPCT_TOTALN:
+ case CTSF_ULAYERROWPCT_TOTALN:
+ case CTSF_ULAYERCOLPCT_TOTALN:
+ case CTSF_UMEAN:
+ case CTSF_UMEDIAN:
+ case CTSF_UMISSING:
+ case CTSF_UMODE:
+ case CTSF_UPTILE:
+ case CTSF_USEMEAN:
+ case CTSF_USTDDEV:
+ case CTSF_USUM:
+ case CSTF_UTOTALN:
+ case CTSF_UVALIDN:
+ case CTSF_UVARIANCE:
+ case CTSF_UROWPCT_SUM:
+ case CTSF_UCOLPCT_SUM:
+ case CTSF_UTABLEPCT_SUM:
+ case CTSF_USUBTABLEPCT_SUM:
+ case CTSF_ULAYERPCT_SUM:
+ case CTSF_ULAYERROWPCT_SUM:
+ case CTSF_ULAYERCOLPCT_SUM:
return false;
}
NOT_REACHED ();
case CTSF_ETOTALN:
case CTSF_VALIDN:
case CTSF_EVALIDN:
+ case CTSF_UCOUNT:
+ case CTSF_UROWPCT_COUNT:
+ case CTSF_UCOLPCT_COUNT:
+ case CTSF_UTABLEPCT_COUNT:
+ case CTSF_USUBTABLEPCT_COUNT:
+ case CTSF_ULAYERPCT_COUNT:
+ case CTSF_ULAYERROWPCT_COUNT:
+ case CTSF_ULAYERCOLPCT_COUNT:
+ case CTSF_UROWPCT_VALIDN:
+ case CTSF_UCOLPCT_VALIDN:
+ case CTSF_UTABLEPCT_VALIDN:
+ case CTSF_USUBTABLEPCT_VALIDN:
+ case CTSF_ULAYERPCT_VALIDN:
+ case CTSF_ULAYERROWPCT_VALIDN:
+ case CTSF_ULAYERCOLPCT_VALIDN:
+ case CTSF_UROWPCT_TOTALN:
+ case CTSF_UCOLPCT_TOTALN:
+ case CTSF_UTABLEPCT_TOTALN:
+ case CTSF_USUBTABLEPCT_TOTALN:
+ case CTSF_ULAYERPCT_TOTALN:
+ case CTSF_ULAYERROWPCT_TOTALN:
+ case CTSF_ULAYERCOLPCT_TOTALN:
+ case CTSF_UMISSING:
+ case CSTF_UTOTALN:
+ case CTSF_UVALIDN:
s->count = 0;
break;
case CTSF_LAYERPCT_SUM:
case CTSF_LAYERROWPCT_SUM:
case CTSF_LAYERCOLPCT_SUM:
+ case CTSF_UMEAN:
+ case CTSF_USEMEAN:
+ case CTSF_USTDDEV:
+ case CTSF_USUM:
+ case CTSF_UVARIANCE:
+ case CTSF_UROWPCT_SUM:
+ case CTSF_UCOLPCT_SUM:
+ case CTSF_UTABLEPCT_SUM:
+ case CTSF_USUBTABLEPCT_SUM:
+ case CTSF_ULAYERPCT_SUM:
+ case CTSF_ULAYERROWPCT_SUM:
+ case CTSF_ULAYERCOLPCT_SUM:
s->moments = moments1_create (MOMENT_VARIANCE);
break;
case CTSF_MEDIAN:
case CTSF_MODE:
case CTSF_PTILE:
+ case CTSF_UMEDIAN:
+ case CTSF_UMODE:
+ case CTSF_UPTILE:
{
struct caseproto *proto = caseproto_create ();
proto = caseproto_add_width (proto, 0);
case CTSF_ETOTALN:
case CTSF_VALIDN:
case CTSF_EVALIDN:
+ case CTSF_UCOUNT:
+ case CTSF_UROWPCT_COUNT:
+ case CTSF_UCOLPCT_COUNT:
+ case CTSF_UTABLEPCT_COUNT:
+ case CTSF_USUBTABLEPCT_COUNT:
+ case CTSF_ULAYERPCT_COUNT:
+ case CTSF_ULAYERROWPCT_COUNT:
+ case CTSF_ULAYERCOLPCT_COUNT:
+ case CTSF_UROWPCT_VALIDN:
+ case CTSF_UCOLPCT_VALIDN:
+ case CTSF_UTABLEPCT_VALIDN:
+ case CTSF_USUBTABLEPCT_VALIDN:
+ case CTSF_ULAYERPCT_VALIDN:
+ case CTSF_ULAYERROWPCT_VALIDN:
+ case CTSF_ULAYERCOLPCT_VALIDN:
+ case CTSF_UROWPCT_TOTALN:
+ case CTSF_UCOLPCT_TOTALN:
+ case CTSF_UTABLEPCT_TOTALN:
+ case CTSF_USUBTABLEPCT_TOTALN:
+ case CTSF_ULAYERPCT_TOTALN:
+ case CTSF_ULAYERROWPCT_TOTALN:
+ case CTSF_ULAYERCOLPCT_TOTALN:
+ case CTSF_UMISSING:
+ case CSTF_UTOTALN:
+ case CTSF_UVALIDN:
break;
case CTSF_MAXIMUM:
case CTSF_LAYERPCT_SUM:
case CTSF_LAYERROWPCT_SUM:
case CTSF_LAYERCOLPCT_SUM:
+ case CTSF_UMEAN:
+ case CTSF_USEMEAN:
+ case CTSF_USTDDEV:
+ case CTSF_USUM:
+ case CTSF_UVARIANCE:
+ case CTSF_UROWPCT_SUM:
+ case CTSF_UCOLPCT_SUM:
+ case CTSF_UTABLEPCT_SUM:
+ case CTSF_USUBTABLEPCT_SUM:
+ case CTSF_ULAYERPCT_SUM:
+ case CTSF_ULAYERROWPCT_SUM:
+ case CTSF_ULAYERCOLPCT_SUM:
moments1_destroy (s->moments);
break;
case CTSF_MEDIAN:
case CTSF_MODE:
case CTSF_PTILE:
+ case CTSF_UMEDIAN:
+ case CTSF_UMODE:
+ case CTSF_UPTILE:
casewriter_destroy (s->writer);
break;
}
s->count += d_weight;
break;
+ case CSTF_UTOTALN:
+ case CTSF_UROWPCT_TOTALN:
+ case CTSF_UCOLPCT_TOTALN:
+ case CTSF_UTABLEPCT_TOTALN:
+ case CTSF_USUBTABLEPCT_TOTALN:
+ case CTSF_ULAYERPCT_TOTALN:
+ case CTSF_ULAYERROWPCT_TOTALN:
+ case CTSF_ULAYERCOLPCT_TOTALN:
+ s->count += 1.0;
+ break;
+
case CTSF_COUNT:
case CTSF_ROWPCT_COUNT:
case CTSF_COLPCT_COUNT:
s->count += d_weight;
break;
+ case CTSF_UCOUNT:
+ case CTSF_UROWPCT_COUNT:
+ case CTSF_UCOLPCT_COUNT:
+ case CTSF_UTABLEPCT_COUNT:
+ case CTSF_USUBTABLEPCT_COUNT:
+ case CTSF_ULAYERPCT_COUNT:
+ case CTSF_ULAYERROWPCT_COUNT:
+ case CTSF_ULAYERCOLPCT_COUNT:
+ if (is_scale || !excluded_missing)
+ s->count += 1.0;
+ break;
+
case CTSF_VALIDN:
case CTSF_ROWPCT_VALIDN:
case CTSF_COLPCT_VALIDN:
s->count += d_weight;
break;
+ case CTSF_UVALIDN:
+ case CTSF_UROWPCT_VALIDN:
+ case CTSF_UCOLPCT_VALIDN:
+ case CTSF_UTABLEPCT_VALIDN:
+ case CTSF_USUBTABLEPCT_VALIDN:
+ case CTSF_ULAYERPCT_VALIDN:
+ case CTSF_ULAYERROWPCT_VALIDN:
+ case CTSF_ULAYERCOLPCT_VALIDN:
+ if (is_scale
+ ? !is_scale_missing
+ : !is_missing)
+ s->count += 1.0;
+ break;
+
case CTSF_MISSING:
if (is_missing)
s->count += d_weight;
break;
+ case CTSF_UMISSING:
+ if (is_missing)
+ s->count += 1.0;
+ break;
+
case CTSF_ECOUNT:
if (is_scale || !excluded_missing)
s->count += e_weight;
moments1_add (s->moments, value->f, e_weight);
break;
+ case CTSF_UMEAN:
+ case CTSF_USEMEAN:
+ case CTSF_USTDDEV:
+ case CTSF_USUM:
+ case CTSF_UVARIANCE:
+ case CTSF_UROWPCT_SUM:
+ case CTSF_UCOLPCT_SUM:
+ case CTSF_UTABLEPCT_SUM:
+ case CTSF_USUBTABLEPCT_SUM:
+ case CTSF_ULAYERPCT_SUM:
+ case CTSF_ULAYERROWPCT_SUM:
+ case CTSF_ULAYERCOLPCT_SUM:
+ if (!is_scale_missing)
+ moments1_add (s->moments, value->f, 1.0);
+ break;
+
+ case CTSF_UMEDIAN:
+ case CTSF_UMODE:
+ case CTSF_UPTILE:
+ d_weight = e_weight = 1.0;
+ /* Fall through. */
case CTSF_MEDIAN:
case CTSF_MODE:
case CTSF_PTILE:
case CTSF_MEDIAN:
case CTSF_PTILE:
case CTSF_MODE:
+ case CTSF_UCOUNT:
+ case CTSF_UMISSING:
+ case CSTF_UTOTALN:
+ case CTSF_UVALIDN:
+ case CTSF_UMEAN:
+ case CTSF_USEMEAN:
+ case CTSF_USTDDEV:
+ case CTSF_USUM:
+ case CTSF_UVARIANCE:
+ case CTSF_UMEDIAN:
+ case CTSF_UPTILE:
+ case CTSF_UMODE:
NOT_REACHED ();
case CTSF_COLPCT_COUNT:
case CTSF_COLPCT_SUM:
case CTSF_COLPCT_TOTALN:
case CTSF_COLPCT_VALIDN:
+ case CTSF_UCOLPCT_COUNT:
+ case CTSF_UCOLPCT_SUM:
+ case CTSF_UCOLPCT_TOTALN:
+ case CTSF_UCOLPCT_VALIDN:
return CTDT_COL;
case CTSF_LAYERCOLPCT_COUNT:
case CTSF_LAYERCOLPCT_SUM:
case CTSF_LAYERCOLPCT_TOTALN:
case CTSF_LAYERCOLPCT_VALIDN:
+ case CTSF_ULAYERCOLPCT_COUNT:
+ case CTSF_ULAYERCOLPCT_SUM:
+ case CTSF_ULAYERCOLPCT_TOTALN:
+ case CTSF_ULAYERCOLPCT_VALIDN:
return CTDT_LAYERCOL;
case CTSF_LAYERPCT_COUNT:
case CTSF_LAYERPCT_SUM:
case CTSF_LAYERPCT_TOTALN:
case CTSF_LAYERPCT_VALIDN:
+ case CTSF_ULAYERPCT_COUNT:
+ case CTSF_ULAYERPCT_SUM:
+ case CTSF_ULAYERPCT_TOTALN:
+ case CTSF_ULAYERPCT_VALIDN:
return CTDT_LAYER;
case CTSF_LAYERROWPCT_COUNT:
case CTSF_LAYERROWPCT_SUM:
case CTSF_LAYERROWPCT_TOTALN:
case CTSF_LAYERROWPCT_VALIDN:
+ case CTSF_ULAYERROWPCT_COUNT:
+ case CTSF_ULAYERROWPCT_SUM:
+ case CTSF_ULAYERROWPCT_TOTALN:
+ case CTSF_ULAYERROWPCT_VALIDN:
return CTDT_LAYERROW;
case CTSF_ROWPCT_COUNT:
case CTSF_ROWPCT_SUM:
case CTSF_ROWPCT_TOTALN:
case CTSF_ROWPCT_VALIDN:
+ case CTSF_UROWPCT_COUNT:
+ case CTSF_UROWPCT_SUM:
+ case CTSF_UROWPCT_TOTALN:
+ case CTSF_UROWPCT_VALIDN:
return CTDT_ROW;
case CTSF_SUBTABLEPCT_COUNT:
case CTSF_SUBTABLEPCT_SUM:
case CTSF_SUBTABLEPCT_TOTALN:
case CTSF_SUBTABLEPCT_VALIDN:
+ case CTSF_USUBTABLEPCT_COUNT:
+ case CTSF_USUBTABLEPCT_SUM:
+ case CTSF_USUBTABLEPCT_TOTALN:
+ case CTSF_USUBTABLEPCT_VALIDN:
return CTDT_SUBTABLE;
case CTSF_TABLEPCT_COUNT:
case CTSF_TABLEPCT_SUM:
case CTSF_TABLEPCT_TOTALN:
case CTSF_TABLEPCT_VALIDN:
+ case CTSF_UTABLEPCT_COUNT:
+ case CTSF_UTABLEPCT_SUM:
+ case CTSF_UTABLEPCT_TOTALN:
+ case CTSF_UTABLEPCT_VALIDN:
return CTDT_TABLE;
}
{
case CTSF_COUNT:
case CTSF_ECOUNT:
+ case CTSF_UCOUNT:
return s->count;
case CTSF_ROWPCT_COUNT:
: SYSMIS);
}
+ case CTSF_UROWPCT_COUNT:
+ case CTSF_UCOLPCT_COUNT:
+ case CTSF_UTABLEPCT_COUNT:
+ case CTSF_USUBTABLEPCT_COUNT:
+ case CTSF_ULAYERPCT_COUNT:
+ case CTSF_ULAYERROWPCT_COUNT:
+ case CTSF_ULAYERCOLPCT_COUNT:
+ {
+ enum ctables_domain_type d = ctables_function_domain (ss->function);
+ return (cell->domains[d]->u_count
+ ? s->count / cell->domains[d]->u_count * 100
+ : SYSMIS);
+ }
+
case CTSF_ROWPCT_VALIDN:
case CTSF_COLPCT_VALIDN:
case CTSF_TABLEPCT_VALIDN:
: SYSMIS);
}
+ case CTSF_UROWPCT_VALIDN:
+ case CTSF_UCOLPCT_VALIDN:
+ case CTSF_UTABLEPCT_VALIDN:
+ case CTSF_USUBTABLEPCT_VALIDN:
+ case CTSF_ULAYERPCT_VALIDN:
+ case CTSF_ULAYERROWPCT_VALIDN:
+ case CTSF_ULAYERCOLPCT_VALIDN:
+ {
+ enum ctables_domain_type d = ctables_function_domain (ss->function);
+ return (cell->domains[d]->u_valid
+ ? s->count / cell->domains[d]->u_valid * 100
+ : SYSMIS);
+ }
+
case CTSF_ROWPCT_TOTALN:
case CTSF_COLPCT_TOTALN:
case CTSF_TABLEPCT_TOTALN:
: SYSMIS);
}
- case CTSF_MISSING:
- return s->count;
+ case CTSF_UROWPCT_TOTALN:
+ case CTSF_UCOLPCT_TOTALN:
+ case CTSF_UTABLEPCT_TOTALN:
+ case CTSF_USUBTABLEPCT_TOTALN:
+ case CTSF_ULAYERPCT_TOTALN:
+ case CTSF_ULAYERROWPCT_TOTALN:
+ case CTSF_ULAYERCOLPCT_TOTALN:
+ {
+ enum ctables_domain_type d = ctables_function_domain (ss->function);
+ return (cell->domains[d]->u_total
+ ? s->count / cell->domains[d]->u_total * 100
+ : SYSMIS);
+ }
+ case CTSF_MISSING:
+ case CTSF_UMISSING:
case CSTF_TOTALN:
case CTSF_ETOTALN:
- return s->count;
-
+ case CSTF_UTOTALN:
case CTSF_VALIDN:
- return s->count;
-
+ case CTSF_UVALIDN:
case CTSF_EVALIDN:
return s->count;
return s->max != SYSMIS && s->min != SYSMIS ? s->max - s->min : SYSMIS;
case CTSF_MEAN:
+ case CTSF_UMEAN:
{
double mean;
moments1_calculate (s->moments, NULL, &mean, NULL, NULL, NULL);
}
case CTSF_SEMEAN:
+ case CTSF_USEMEAN:
{
double weight, variance;
moments1_calculate (s->moments, &weight, NULL, &variance, NULL, NULL);
}
case CTSF_STDDEV:
+ case CTSF_USTDDEV:
{
double variance;
moments1_calculate (s->moments, NULL, NULL, &variance, NULL, NULL);
}
case CTSF_SUM:
+ case CTSF_USUM:
{
double weight, mean;
moments1_calculate (s->moments, &weight, &mean, NULL, NULL, NULL);
}
case CTSF_VARIANCE:
+ case CTSF_UVARIANCE:
{
double variance;
moments1_calculate (s->moments, NULL, NULL, &variance, NULL, NULL);
case CTSF_LAYERPCT_SUM:
case CTSF_LAYERROWPCT_SUM:
case CTSF_LAYERCOLPCT_SUM:
+ case CTSF_UROWPCT_SUM:
+ case CTSF_UCOLPCT_SUM:
+ case CTSF_UTABLEPCT_SUM:
+ case CTSF_USUBTABLEPCT_SUM:
+ case CTSF_ULAYERPCT_SUM:
+ case CTSF_ULAYERROWPCT_SUM:
+ case CTSF_ULAYERCOLPCT_SUM:
NOT_REACHED ();
case CTSF_MEDIAN:
case CTSF_PTILE:
+ case CTSF_UMEDIAN:
+ case CTSF_UPTILE:
if (s->writer)
{
struct casereader *reader = casewriter_make_reader (s->writer);
return s->ovalue;
case CTSF_MODE:
+ case CTSF_UMODE:
if (s->writer)
{
struct casereader *reader = casewriter_make_reader (s->writer);
struct ctables_domain *d = cell->domains[dt];
d->d_total += d_weight;
d->e_total += e_weight;
+ d->u_total += 1.0;
if (!excluded_missing)
{
d->d_count += d_weight;
d->e_count += e_weight;
+ d->u_count += 1.0;
}
if (!is_missing)
{
d->d_valid += d_weight;
d->e_valid += e_weight;
+ d->u_count += 1.0;
}
}
}