doc/examples/independent-samples-t.sps \
doc/examples/reliability.sps \
doc/examples/split.sps \
+ doc/examples/tutorial1.sps \
+ doc/examples/tutorial2.sps \
+ doc/examples/tutorial3.sps \
+ doc/examples/tutorial4.sps \
+ doc/examples/tutorial5.sps \
+ doc/examples/tutorial6.sps \
+ doc/examples/tutorial7.sps \
doc/examples/weight.sps
EXTRA_DIST += $(EXAMPLE_SYNTAX)
+EXAMPLE_SPVS = $(EXAMPLE_SYNTAX:.sps=.spv) doc/examples/tutorial7b.spv
EXAMPLE_OUTPUTS = $(EXAMPLE_SYNTAX:.sps=.out)
EXAMPLE_HTML = $(EXAMPLE_SYNTAX:.sps=.html)
+example-spv: $(EXAMPLE_SPVS)
example-outputs: $(EXAMPLE_OUTPUTS)
example-html: $(EXAMPLE_HTML)
PHONY += example-outputs example-html
$(EXAMPLE_OUTPUTS): $(pspp)
$(EXAMPLE_HTML): $(pspp)
-CLEANFILES += $(EXAMPLE_OUTPUTS)
+CLEANFILES += $(EXAMPLE_OUTPUTS) $(EXAMPLE_SPVS)
SUFFIXES: .sps
-# use pspp to process a syntax file and reap the output into a text file
-.sps.out:
+# Use pspp to process a syntax file into an output file.
+.sps.spv:
$(AM_V_GEN)(cd $(top_srcdir)/examples \
- && $(pspp) ../doc/examples/$(<F) -o -) > $@.tmp && mv $@.tmp $@
-
-# Use pspp to process a syntax file and reap the output into a html file
-# Then, use sed to delete everything up to and including <body> and
-# everything after and including </body>
-.sps.html:
- $(AM_V_GEN)(cd $(top_srcdir)/examples \
- && $(pspp) ../doc/examples/$(<F) -o - -O format=html) \
- | $(SED) -e '\%</body%,$$d' -e '0,/<body/d' > $@.tmp && mv $@.tmp $@
+ && $(pspp) ../doc/examples/$(<F) -o - -O format=spv) > $@.tmp
+ $(AM_V_at)mv $@.tmp $@
+
+# The tutorial only wants some parts of the output here.
+pspp_output = utilities/pspp-output
+doc/examples/tutorial7b.spv: doc/examples/tutorial7.spv $(pspp_output)
+ $(AM_V_GEN)$(pspp_output) convert --subtypes=coefficients $< $@
+
+# Convert an output file into a text file or HTML file.
+#
+# (For HTML, use sed to include only the contents of <body>.)
+.spv.out:
+ $(AM_V_GEN)utilities/pspp-output convert $< $@
+.spv.html:
+ $(AM_V_GEN)utilities/pspp-output convert $< - -O format=html \
+ | $(SED) -e '\%</body%,$$d' -e '0,/<body/d' > $@.tmp
+ $(AM_V_at)mv $@.tmp $@
# Insert the link tag for the cascading style sheet.
# But make sure these operations are idempotent.
The optional text @samp{/format=numbered} requests the case numbers to be
shown along with the data.
It should show the following output:
-@example
-@group
- Data List
-+-----------+---------+------+
-|Case Number| forename|height|
-+-----------+---------+------+
-|1 |Ahmed |188.00|
-|2 |Bertram |167.00|
-|3 |Catherine|134.23|
-|4 |David |109.10|
-+-----------+---------+------+
-@end group
-@end example
+@psppoutput {tutorial1}
@noindent
Note that the numeric variable @exvar{height} is displayed to 2 decimal
places, because the format for that variable is @samp{F8.2}.
@end example
Output:
-@example
- Descriptive Statistics
-+---------------------+--+-------+-------+-------+-------+
-| | N| Mean |Std Dev|Minimum|Maximum|
-+---------------------+--+-------+-------+-------+-------+
-|Sex of subject |40| .45| .50|Male |Female |
-|Weight in kilograms |40| 72.12| 26.70| -55.6| 92.1|
-|Height in millimeters|40|1677.12| 262.87| 179| 1903|
-|Valid N (listwise) |40| | | | |
-|Missing N (listwise) | 0| | | | |
-+---------------------+--+-------+-------+-------+-------+
-@end example
+@psppoutput {tutorial2}
@end cartouche
@caption{Using the @cmd{DESCRIPTIVES} command to display simple
summary information about the data.
@end example
Output (dictionary information omitted for clarity):
-@example
-Scale: ANY
-
-Case Processing Summary
-+--------+--+-------+
-|Cases | N|Percent|
-+--------+--+-------+
-|Valid |17| 100.0%|
-|Excluded| 0| .0%|
-|Total |17| 100.0%|
-+--------+--+-------+
-
- Reliability Statistics
-+----------------+----------+
-|Cronbach's Alpha|N of Items|
-+----------------+----------+
-| .81| 3|
-+----------------+----------+
-@end example
+@psppoutput {tutorial4}
@end cartouche
@caption{Recoding negatively scaled variables, and testing for
reliability with the @cmd{RELIABILITY} command. The Cronbach Alpha
@end example
Output:
-@example
- Case Processing Summary
-+-----------------------------------+-------------------------------+
-| | Cases |
-| +----------+---------+----------+
-| | Valid | Missing | Total |
-| | N|Percent|N|Percent| N|Percent|
-+-----------------------------------+--+-------+-+-------+--+-------+
-|Mean time between failures (months)|15| 100.0%|0| .0%|15| 100.0%|
-+-----------------------------------+--+-------+-+-------+--+-------+
-
- Descriptives
-+----------------------------------------------------------+---------+--------+
-| | | Std. |
-| |Statistic| Error |
-+----------------------------------------------------------+---------+--------+
-|Mean time between Mean | 8.32| 1.62|
-|failures (months) 95% Confidence Interval Lower | 4.85| |
-| for Mean Bound | | |
-| Upper | 11.79| |
-| Bound | | |
-| 5% Trimmed Mean | 7.69| |
-| Median | 8.12| |
-| Variance | 39.21| |
-| Std. Deviation | 6.26| |
-| Minimum | 1.63| |
-| Maximum | 26.47| |
-| Range | 24.84| |
-| Interquartile Range | 5.83| |
-| Skewness | 1.85| .58|
-| Kurtosis | 4.49| 1.12|
-+----------------------------------------------------------+---------+--------+
-
- Case Processing Summary
-+-------+-------------------------------+
-| | Cases |
-| +----------+---------+----------+
-| | Valid | Missing | Total |
-| | N|Percent|N|Percent| N|Percent|
-+-------+--+-------+-+-------+--+-------+
-|mtbf_ln|15| 100.0%|0| .0%|15| 100.0%|
-+-------+--+-------+-+-------+--+-------+
-
- Descriptives
-+----------------------------------------------------+---------+----------+
-| |Statistic|Std. Error|
-+----------------------------------------------------+---------+----------+
-|mtbf_ln Mean | 1.88| .19|
-| 95% Confidence Interval for Mean Lower Bound| 1.47| |
-| Upper Bound| 2.29| |
-| 5% Trimmed Mean | 1.88| |
-| Median | 2.09| |
-| Variance | .54| |
-| Std. Deviation | .74| |
-| Minimum | .49| |
-| Maximum | 3.28| |
-| Range | 2.79| |
-| Interquartile Range | .92| |
-| Skewness | -.16| .58|
-| Kurtosis | -.09| 1.12|
-+----------------------------------------------------+---------+----------+
-@end example
+@psppoutput {tutorial5}
@end cartouche
@caption{Testing for normality using the @cmd{EXAMINE} command and applying
a logarithmic transformation.
@prompt{PSPP>} t-test group=sex(0,1) /variables = height temperature.
@end example
Output:
-@example
- Group Statistics
-+-------------------------------------------+--+-------+-------------+--------+
-| | | | Std. | S.E. |
-| Group | N| Mean | Deviation | Mean |
-+-------------------------------------------+--+-------+-------------+--------+
-|Height in millimeters Male |22|1796.49| 49.71| 10.60|
-| Female|17|1610.77| 25.43| 6.17|
-+-------------------------------------------+--+-------+-------------+--------+
-|Internal body temperature in degrees Male |22| 36.68| 1.95| .42|
-|Celcius Female|18| 37.43| 1.61| .38|
-+-------------------------------------------+--+-------+-------------+--------+
-
- Independent Samples Test
-+---------------------+-----------------------------------------------------
-| | Levene's
-| | Test for
-| | Equality
-| | of
-| | Variances T-Test for Equality of Means
-| +----+-----+-----+-----+-------+----------+----------+
-| | | | | | | | |
-| | | | | | | | |
-| | | | | | | | |
-| | | | | | | | |
-| | | | | | Sig. | | |
-| | | | | | (2- | Mean |Std. Error|
-| | F | Sig.| t | df |tailed)|Difference|Difference|
-+---------------------+----+-----+-----+-----+-------+----------+----------+
-|Height in Equal | .97| .331|14.02|37.00| .000| 185.72| 13.24|
-|millimeters variances| | | | | | | |
-| assumed | | | | | | | |
-| Equal | | |15.15|32.71| .000| 185.72| 12.26|
-| variances| | | | | | | |
-| not | | | | | | | |
-| assumed | | | | | | | |
-+---------------------+----+-----+-----+-----+-------+----------+----------+
-|Internal Equal | .31| .581|-1.31|38.00| .198| -.75| .57|
-|body variances| | | | | | | |
-|temperature assumed | | | | | | | |
-|in degrees Equal | | |-1.33|37.99| .190| -.75| .56|
-|Celcius variances| | | | | | | |
-| not | | | | | | | |
-| assumed | | | | | | | |
-+---------------------+----+-----+-----+-----+-------+----------+----------+
-
-+---------------------+-------------+
-| | |
-| | |
-| | |
-| | |
-| | |
-| +-------------+
-| | 95% |
-| | Confidence |
-| | Interval of |
-| | the |
-| | Difference |
-| +------+------+
-| | Lower| Upper|
-+---------------------+------+------+
-|Height in Equal |158.88|212.55|
-|millimeters variances| | |
-| assumed | | |
-| Equal |160.76|210.67|
-| variances| | |
-| not | | |
-| assumed | | |
-+---------------------+------+------+
-|Internal Equal | -1.91| .41|
-|body variances| | |
-|temperature assumed | | |
-|in degrees Equal | -1.89| .39|
-|Celcius variances| | |
-| not | | |
-| assumed | | |
-+---------------------+------+------+
-@end example
+@psppoutput {tutorial6}
@end cartouche
@caption{The @cmd{T-TEST} command tests for differences of means.
Here, the @exvar{height} variable's two tailed significance is less than
@prompt{PSPP>} regression /variables = mtbf /dependent = mttr.
@end example
Output (excerpts):
-@example
- Coefficients (Mean time to repair (hours) )
-+------------------------+-----------------------------------------+-----+----+
-| | Unstandardized Standardized | | |
-| | Coefficients Coefficients | | |
-| +---------+-----------+-------------------+ | |
-| | B | Std. Error| Beta | t |Sig.|
-+------------------------+---------+-----------+-------------------+-----+----+
-|(Constant) | 9.81| 1.50| .00| 6.54|.000|
-|Mean time between | 3.10| .10| .99|32.43|.000|
-|failures (months) | | | | | |
-|Ratio of working to non-| 1.09| 1.78| .02| .61|.552|
-|working time | | | | | |
-+------------------------+---------+-----------+-------------------+-----+----+
-
- Coefficients (Mean time to repair (hours) )
-+-----------------------+------------------------------------------+-----+----+
-| | Unstandardized Standardized | | |
-| | Coefficients Coefficients | | |
-| +---------+------------+-------------------+ | |
-| | B | Std. Error | Beta | t |Sig.|
-+-----------------------+---------+------------+-------------------+-----+----+
-|(Constant) | 10.50| .96| .00|10.96|.000|
-|Mean time between | 3.11| .09| .99|33.39|.000|
-|failures (months) | | | | | |
-+-----------------------+---------+------------+-------------------+-----+----+
-@end example
+@psppoutput {tutorial7b}
@end cartouche
@caption{Linear regression analysis to find a predictor for
@exvar{mttr}.