X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=doc%2Fstatistics.texi;fp=doc%2Fstatistics.texi;h=5b8b841933f3974b2f12410df414864a15b87523;hb=573bdf24eadcb5a16c3fab8c87090e2120b04c0a;hp=78b76bfbc492e2a1d48622ceb04f9bd629fd6e77;hpb=1b9ed07d1681f7744552a9e32e8136cffc2ae344;p=pspp diff --git a/doc/statistics.texi b/doc/statistics.texi index 78b76bfbc4..5b8b841933 100644 --- a/doc/statistics.texi +++ b/doc/statistics.texi @@ -1506,7 +1506,7 @@ order: @table @asis @item Explicit categories. -@anchor{CTABLE Explicit Category List} +@anchor{CTABLES Explicit Category List} To explicitly specify categories to include, list the categories within square brackets in the desired sort order. Use spaces or commas to separate values. Categories not covered by the list are @@ -1707,9 +1707,46 @@ is optional. With @code{SMISSING=VARIABLE}, which is the default, missing values are excluded on a variable-by-variable basis. With -@code{SMISSING=LISTWISE}, when scalar variables are stacked, a missing -value for any of the scalar variables causes the case to be excluded -for all of them. +@code{SMISSING=LISTWISE}, when stacked scalar variables are nested +together with a categorical variable, a missing value for any of the +scalar variables causes the case to be excluded for all of them. + +As an example, consider the following dataset, in which @samp{x} is a +categorical variable and @samp{y} and @samp{z} are scale: + +@psppoutput{ctables18} + +@noindent +With the default missing-value treatment, @samp{x}'s mean is 20, based +on the values 10, 20, and 30, and @samp{y}'s mean is 50, based on 40, +50, and 60: + +@example +CTABLES /TABLE (y + z) > x. +@end example +@psppoutput{ctables19} + +@noindent +By adding @code{SMISSING=LISTWISE}, only cases where @samp{y} and +@samp{z} are both non-missing are considered, so @samp{x}'s mean +becomes 15, as the average of 10 and 20, and @samp{y}'s mean becomes +55, the average of 50 and 60: + +@example +CTABLES /SMISSING LISTWISE /TABLE (y + z) > x. +@end example +@psppoutput{ctables20} + +@noindent +Even with @code{SMISSING=LISTWISE}, if @samp{y} and @samp{z} are +separately nested with @samp{x}, instead of using a single @samp{>} +operator, missing values revert to being considered on a +variable-by-variable basis: + +@example +CTABLES /SMISSING LISTWISE /TABLE (y > x) + (z > x). +@end example +@psppoutput{ctables21} @node CTABLES Computed Categories @subsection Computed Categories @@ -1722,7 +1759,7 @@ for all of them. categories created using arithmetic on categories obtained from the data. The @code{PCOMPUTE} subcommand defines computed categories, which can then be used in two places: on @code{CATEGORIES} within an -explicit category list (@pxref{CTABLE Explicit Category List}), and on +explicit category list (@pxref{CTABLES Explicit Category List}), and on the @code{PPROPERTIES} subcommand to define further properties for a given postcompute. @@ -1749,7 +1786,7 @@ postcompute must have the same form. @itemx MISSING @itemx OTHERNM These forms evaluate to the summary statistics for categories matching -the given syntax, as described in previous sections (@pxref{CTABLE +the given syntax, as described in previous sections (@pxref{CTABLES Explicit Category List}). If more than one category matches, their values are summed.