docs
[pspp] / doc / tutorial.texi
index b4d4ac11b2868916bec6c7738811a2fc6e75f3ff..4898179e4ea9fd07a32e55f9e69ac266c4e14824 100644 (file)
@@ -1,5 +1,5 @@
 @c PSPP - a program for statistical analysis.
-@c Copyright (C) 2017 Free Software Foundation, Inc.
+@c Copyright (C) 2017, 2020 Free Software Foundation, Inc.
 @c Permission is granted to copy, distribute and/or modify this document
 @c under the terms of the GNU Free Documentation License, Version 1.3
 @c or any later version published by the Free Software Foundation;
@@ -26,8 +26,8 @@ but it shows how such analysis can be performed using @pspp{}.
 For the purposes of this tutorial, it is assumed that you are using @pspp{} in its
 interactive mode from the command line.
 However, the example commands can also be typed into a file and executed in
-a post-hoc mode by typing @samp{pspp @var{filename}} at a shell prompt,
-where @var{filename} is the name of the file containing the commands.
+a post-hoc mode by typing @samp{pspp @var{file-name}} at a shell prompt,
+where @var{file-name} is the name of the file containing the commands.
 Alternatively, from the graphical interface, you can select
 @clicksequence{File @click{} New @click{} Syntax} to open a new syntax window
 and use the @clicksequence{Run} menu when a syntax fragment is ready to be
@@ -77,8 +77,8 @@ There are two aspects of data:
 @end itemize
 
 @noindent
-For example, a data set which has the variables @var{height}, @var{weight}, and
-@var{name}, might have the observations:
+For example, a data set which has the variables @exvar{height}, @exvar{weight}, and
+@exvar{name}, might have the observations:
 @example
 1881 89.2 Ahmed
 1192 107.01 Frank
@@ -108,12 +108,9 @@ String variables are best reserved for commentary data to assist the
 human observer.
 However they can also be used for nominal or categorical data.
 
+The following example defines two variables @exvar{forename} and @exvar{height},
+and reads data into them by manual input:
 
-@ref{data-list} defines two variables @var{forename} and @var{height},
-and reads data into them by manual input.
-
-@float Example, data-list
-@cartouche
 @example
 @prompt{PSPP>} data list list /forename (A12) height.
 @prompt{PSPP>} begin data.
@@ -124,12 +121,6 @@ and reads data into them by manual input.
 @prompt{data>} end data
 @prompt{PSPP>}
 @end example
-@end cartouche
-@caption{Manual entry of data using the @cmd{DATA LIST} command.
-Two variables
-@var{forename} and @var{height} are defined and subsequently filled
-with  manually entered data.}
-@end float
 
 There are several things to note about this example.
 
@@ -150,7 +141,7 @@ variables which you wish to define.
 
 @item
 The text @samp{forename} is the name of the first variable,
-and @samp{(A12)} says that the variable @var{forename} is a string
+and @samp{(A12)} says that the variable @exvar{forename} is a string
 variable and that its maximum length is 12 bytes.
 The second variable's name is specified by the text @samp{height}.
 Since no format is given, this variable has the default format.
@@ -161,7 +152,7 @@ locales which use a period (@samp{.}) as the decimal separator.
 However if you are using a system with a locale which uses the comma (@samp{,})
 as the decimal separator, then you should in the subsequent lines substitute
 @samp{.} with @samp{,}.
-Alternatively, you could explicitly tell @pspp{} that the @var{height}
+Alternatively, you could explicitly tell @pspp{} that the @exvar{height}
 variable is to be read using a period as its decimal separator by appending the
 text @samp{DOT8.3} after the word @samp{height}.
 For more information on data formats, @pxref{Input and Output Formats}.
@@ -195,21 +186,9 @@ to list the data.
 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 @var{height} is displayed to 2 decimal
+Note that the numeric variable @exvar{height} is displayed to 2 decimal
 places, because the format for that variable is @samp{F8.2}.
 For a complete description of the @cmd{LIST} command, @pxref{LIST}.
 
@@ -341,90 +320,48 @@ The example file @file{physiology.sav} contains a number of physiological
 measurements of a sample of healthy adults selected at random.
 However, the data entry clerk made a number of mistakes when entering
 the data.
-@ref{descriptives} illustrates the use of @cmd{DESCRIPTIVES} to screen this
-data and identify the erroneous values.
+The following example illustrates the use of @cmd{DESCRIPTIVES} to screen this
+data and identify the erroneous values:
 
-@float Example, descriptives
-@cartouche
 @example
 @prompt{PSPP>} get file='@value{example-dir}/physiology.sav'.
 @prompt{PSPP>} descriptives sex, weight, height.
 @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
-@end cartouche
-@caption{Using the @cmd{DESCRIPTIVES} command to display simple
-summary information about the data.
-In this case, the results show unexpectedly low values in the Minimum
-column, suggesting incorrect data entry.}
-@end float
-
-In the output of @ref{descriptives},
-the most interesting column is the minimum value.
-The @var{weight} variable has a minimum value of less than zero,
+@noindent For this example, PSPP produces the following output:
+@psppoutput {tutorial2a}
+
+The most interesting column in the output is the minimum value.
+The @exvar{weight} variable has a minimum value of less than zero,
 which is clearly erroneous.
-Similarly, the @var{height} variable's minimum value seems to be very low.
+Similarly, the @exvar{height} variable's minimum value seems to be very low.
 In fact, it is more than 5 standard deviations from the mean, and is a
 seemingly bizarre height for an adult person.
-We can examine the data in more detail with the @cmd{EXAMINE}
-command (@pxref{EXAMINE}):
 
-In @ref{ex1} you can see that the lowest value of @var{height} is
+We can look deeper into these discrepancies by issuing an additional
+@cmd{EXAMINE} command:
+
+@example
+@prompt{PSPP>} examine height, weight /statistics=extreme(3).
+@end example
+
+@noindent This command produces the following additional output (in part):
+@psppoutput {tutorial2b}
+
+@noindent
+From this new output, you can see that the lowest value of @exvar{height} is
 179 (which we suspect to be erroneous), but the second lowest is 1598
 which
-we know from the @cmd{DESCRIPTIVES} command
+we know from @cmd{DESCRIPTIVES}
 is within 1 standard deviation from the mean.
-Similarly the @var{weight} variable has a lowest value which is
-negative but a plausible value for the second lowest value.
+Similarly, the lowest value of @exvar{weight} is
+negative, but its second lowest value is plausible.
 This suggests that the two extreme values are outliers and probably
 represent data entry errors.
 
-@float Example, ex1
-@cartouche
-[@dots{} continue from @ref{descriptives}]
-@example
-@prompt{PSPP>} examine height, weight /statistics=extreme(3).
-@end example
-
-Output:
-@example
-                   Extreme Values
-+-------------------------------+-----------+-----+
-|                               |Case Number|Value|
-+-------------------------------+-----------+-----+
-|Height in millimeters Highest 1|         14| 1903|
-|                              2|         15| 1884|
-|                              3|         12| 1802|
-|                      Lowest  1|         30|  179|
-|                              2|         31| 1598|
-|                              3|         28| 1601|
-+-------------------------------+-----------+-----+
-|Weight in kilograms   Highest 1|         13| 92.1|
-|                              2|          5| 92.1|
-|                              3|         17| 91.7|
-|                      Lowest  1|         38|-55.6|
-|                              2|         39| 54.5|
-|                              3|         33| 55.4|
-+-------------------------------+-----------+-----+
-@end example
-@end cartouche
-@caption{Using the @cmd{EXAMINE} command to see the extremities of the data
-for different variables.  Cases 30 and 38 seem to contain values
-very much lower than the rest of the data.
-They are possibly erroneous.}
-@end float
+The output also identifies the case numbers for each extreme value,
+so we can see that
+cases 30 and 38 are the ones with the erroneous values.
 
 @node Dealing with suspicious data
 @subsection Dealing with suspicious data
@@ -444,16 +381,16 @@ command.
 @end example
 @noindent
 The first command says that for any observation which has a
-@var{height} value of 179, that value should be changed to the SYSMIS
+@exvar{height} value of 179, that value should be changed to the SYSMIS
 value.
-The second command says that any @var{weight} values of zero or less
+The second command says that any @exvar{weight} values of zero or less
 should be changed to SYSMIS.
 From now on, they will be ignored in analysis.
 For detailed information about the @cmd{RECODE} command @pxref{RECODE}.
 
-If you now re-run the @cmd{DESCRIPTIVES} or @cmd{EXAMINE} commands in
-@ref{descriptives} and @ref{ex1} you
-will see a data summary with more plausible parameters.
+If you now re-run the @cmd{DESCRIPTIVES} or @cmd{EXAMINE} commands from
+the previous section,
+you will see a data summary with more plausible parameters.
 You will also notice that the data summaries indicate the two missing values.
 
 @node Inverting negatively coded variables
@@ -464,17 +401,22 @@ You will also notice that the data summaries indicate the two missing values.
 Data entry errors are not the only reason for wanting to recode data.
 The sample file @file{hotel.sav} comprises data gathered from a
 customer satisfaction survey of clients at a particular hotel.
-In @ref{reliability}, this file is loaded for analysis.
-The line @code{display dictionary.} tells @pspp{} to display the
-variables and associated data.
-The output from this command has been omitted from the example for the sake of clarity, but
-you will notice that each of the variables
-@var{v1}, @var{v2} @dots{} @var{v5}  are measured on a 5 point Likert scale,
+The following commands load the file and display its
+variables and associated data:
+
+@example
+@prompt{PSPP>} get file='@value{example-dir}/hotel.sav'.
+@prompt{PSPP>} display dictionary.
+@end example
+
+@noindent It yields the following output:
+
+@psppoutput {tutorial3}
+
+The output shows that all of the variables @exvar{v1} through @exvar{v5} are measured on a 5 point Likert scale,
 with 1 meaning ``Strongly disagree'' and 5 meaning ``Strongly agree''.
-Whilst variables @var{v1}, @var{v2} and @var{v4} record responses
-to a positively posed question, variables @var{v3} and @var{v5} are
-responses to negatively worded questions.
-In order to perform meaningful analysis, we need to recode the variables so
+However, some of the questions are positively worded (@exvar{v1}, @exvar{v2}, @exvar{v4}) and others are negatively worded (@exvar{v3}, @exvar{v5}).
+To perform meaningful analysis, we need to recode the variables so
 that they all measure in the same direction.
 We could use the @cmd{RECODE} command, with syntax such as:
 @example
@@ -489,8 +431,8 @@ subtracting their value  from 6 has the effect of inverting them:
 compute @var{var} = 6 - @var{var}.
 @end example
 @noindent
-@ref{reliability} uses this technique to recode the variables
-@var{v3} and @var{v5}.
+The following section uses this technique to recode the variables
+@exvar{v3} and @exvar{v5}.
 After applying  @cmd{COMPUTE} for both variables,
 all subsequent commands will use the inverted values.
 
@@ -505,57 +447,31 @@ A sensible check to perform on survey data is the calculation of
 reliability.
 This gives the statistician some confidence that the questionnaires have been
 completed thoughtfully.
-If you examine the labels of variables @var{v1},  @var{v3} and @var{v4},
+If you examine the labels of variables @exvar{v1},  @exvar{v3} and @exvar{v4},
 you will notice that they ask very similar questions.
 One would therefore expect the values of these variables (after recoding)
 to closely follow one another, and we can test that with the @cmd{RELIABILITY}
 command (@pxref{RELIABILITY}).
-@ref{reliability} shows a @pspp{} session where the user (after recoding
-negatively scaled variables) requests reliability statistics for
-@var{v1}, @var{v3} and @var{v4}.
+The following example shows a @pspp{} session where the user recodes
+negatively scaled variables and then requests reliability statistics for
+@exvar{v1}, @exvar{v3}, and @exvar{v4}.
 
-@float Example, reliability
-@cartouche
 @example
 @prompt{PSPP>} get file='@value{example-dir}/hotel.sav'.
-@prompt{PSPP>} display dictionary.
-@prompt{PSPP>} * recode negatively worded questions.
 @prompt{PSPP>} compute v3 = 6 - v3.
 @prompt{PSPP>} compute v5 = 6 - v5.
 @prompt{PSPP>} reliability v1, v3, v4.
 @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
-@end cartouche
-@caption{Recoding negatively scaled variables, and testing for
-reliability with the @cmd{RELIABILITY} command. The Cronbach Alpha
-coefficient suggests a high degree of reliability among variables
-@var{v1}, @var{v3} and @var{v4}.}
-@end float
+@noindent This yields the following output:
+@psppoutput {tutorial4}
 
 As a rule of thumb, many statisticians consider a value of Cronbach's Alpha of
 0.7 or higher to indicate reliable data.
-Here, the value is 0.81 so the data and the recoding that we performed
-are vindicated.
+
+Here, the value is 0.81, which suggests a high degree of reliability
+among variables @exvar{v1}, @exvar{v3} and @exvar{v4}, so the data and
+the recoding that we performed are vindicated.
 
 
 @node Testing for normality
@@ -568,121 +484,57 @@ normality --- the data must have been drawn from a normal distribution.
 It is necessary then to ensure normality before deciding upon the
 test procedure to use.  One way to do this uses the @cmd{EXAMINE} command.
 
-In @ref{normality}, a researcher was examining the failure rates
+In the following example, a researcher was examining the failure rates
 of equipment produced by an engineering company.
 The file @file{repairs.sav} contains the mean time between
-failures (@var{mtbf}) of some items of equipment subject to the study.
+failures (@exvar{mtbf}) of some items of equipment subject to the study.
 Before performing linear analysis on the data,
 the researcher wanted to ascertain that the data is normally distributed.
 
+@example
+@prompt{PSPP>} get file='@value{example-dir}/repairs.sav'.
+@prompt{PSPP>} examine mtbf
+                /statistics=descriptives.
+@end example
+
+@noindent This produces the following output:
+@psppoutput {tutorial5a}
+
 A normal distribution has a skewness and kurtosis of zero.
-Looking at the skewness of @var{mtbf} in @ref{normality} it is clear
+The skewness of @exvar{mtbf} in the output above makes it clear
 that the mtbf figures have a lot of positive skew and are therefore
 not drawn from a normally distributed variable.
 Positive skew can often be compensated for by applying a logarithmic
-transformation.
-This is done with the @cmd{COMPUTE} command in the line
+transformation, as in the following continuation of the example:
+
+@example
+@prompt{PSPP>} compute mtbf_ln = ln (mtbf).
+@prompt{PSPP>} examine mtbf_ln
+                /statistics=descriptives.
+@end example
+
+@noindent which produces the following additional output:
+@psppoutput {tutorial5b}
+
+The @cmd{COMPUTE} command in the first line above performs the
+logarithmic transformation:
 @example
 compute mtbf_ln = ln (mtbf).
 @end example
 @noindent
 Rather than redefining the existing variable, this use of @cmd{COMPUTE}
-defines a new variable @var{mtbf_ln} which is
-the natural logarithm of @var{mtbf}.
-The final command in this example calls @cmd{EXAMINE} on this new variable,
-and it can be seen from the results that both the skewness and
-kurtosis for @var{mtbf_ln} are very close to zero.
-This provides some confidence that the @var{mtbf_ln} variable is
+defines a new variable @exvar{mtbf_ln} which is
+the natural logarithm of @exvar{mtbf}.
+The final command in this example calls @cmd{EXAMINE} on this new variable.
+The results show that both the skewness and
+kurtosis for @exvar{mtbf_ln} are very close to zero.
+This provides some confidence that the @exvar{mtbf_ln} variable is
 normally distributed and thus safe for linear analysis.
 In the event that no suitable transformation can be found,
 then it would be worth considering
 an appropriate non-parametric test instead of a linear one.
 @xref{NPAR TESTS}, for information about non-parametric tests.
 
-@float Example, normality
-@cartouche
-@example
-@prompt{PSPP>} get file='@value{example-dir}/repairs.sav'.
-@prompt{PSPP>} examine mtbf
-                /statistics=descriptives.
-@prompt{PSPP>} compute mtbf_ln = ln (mtbf).
-@prompt{PSPP>} examine mtbf_ln
-                /statistics=descriptives.
-@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
-@end cartouche
-@caption{Testing for normality using the @cmd{EXAMINE} command and applying
-a logarithmic transformation.
-The @var{mtbf} variable has a large positive skew and is therefore
-unsuitable for linear statistical analysis.
-However the transformed variable (@var{mtbf_ln}) is close to normal and
-would appear to be more suitable.}
-@end float
-
-
 @node Hypothesis Testing
 @section Hypothesis Testing
 
@@ -732,11 +584,10 @@ A common statistical test involves hypotheses about means.
 The @cmd{T-TEST} command is used to find out whether or not two separate
 subsets have the same mean.
 
-@ref{t-test} uses the file @file{physiology.sav} previously
-encountered.
 A researcher suspected that the heights and core body
 temperature of persons might be different depending upon their sex.
-To investigate this, he posed two null hypotheses:
+To investigate this, he posed two null hypotheses based on the data
+from @file{physiology.sav} previously encountered:
 @itemize @bullet
 @item The mean heights of males and females in the population are equal.
 @item The mean body temperature of males and
@@ -753,7 +604,7 @@ However if it is unsafe to assume equal variances,
 then an alternative calculation is necessary.
 @pspp{} performs both calculations.
 
-For the @var{height} variable, the output shows the significance of the
+For the @exvar{height} variable, the output shows the significance of the
 Levene test to be 0.33 which means there is a
 33% probability that the
 Levene test produces this outcome when the variances are equal.
@@ -761,114 +612,36 @@ Had the significance been less than 0.05, then it would have been unsafe to assu
 the variances were equal.
 However, because the value is higher than 0.05 the homogeneity of variances assumption
 is safe and the ``Equal Variances'' row (the more powerful test) can be used.
-Examining this row, the two tailed significance for the @var{height} t-test
+Examining this row, the two tailed significance for the @exvar{height} t-test
 is less than 0.05, so it is safe to reject the null hypothesis and conclude
 that the mean heights of males and females are unequal.
 
-For the @var{temperature} variable, the significance of the Levene test
+For the @exvar{temperature} variable, the significance of the Levene test
 is 0.58 so again, it is safe to use the row for equal variances.
 The equal variances row indicates that the two tailed significance for
-@var{temperature} is 0.20.  Since this is greater than 0.05 we must reject
+@exvar{temperature} is 0.20.  Since this is greater than 0.05 we must reject
 the null hypothesis and conclude that there is insufficient evidence to
 suggest that the body temperature of male and female persons are different.
 
-@float Example, t-test
-@cartouche
+The syntax for this analysis is:
 @example
 @prompt{PSPP>} get file='@value{example-dir}/physiology.sav'.
 @prompt{PSPP>} recode height (179 = SYSMIS).
 @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
-@end cartouche
-@caption{The @cmd{T-TEST} command tests for differences of means.
-Here, the @var{height} variable's two tailed significance is less than
+
+PSPP produces the following output for this syntax:
+@psppoutput {tutorial6}
+
+The @cmd{T-TEST} command tests for differences of means.
+Here, the @exvar{height} variable's two tailed significance is less than
 0.05, so the null hypothesis can be rejected.
 Thus, the evidence suggests there is a difference between the heights of
 male and female persons.
-However the significance of the test for the @var{temperature}
+However the significance of the test for the @exvar{temperature}
 variable is greater than 0.05 so the null hypothesis cannot be
 rejected, and there is insufficient evidence to suggest a difference
-in body temperature.}
-@end float
+in body temperature.
 
 @node Linear Regression
 @subsection Linear Regression
@@ -880,7 +653,7 @@ is linearly related to others.
 If a variable is found to be linearly related, then this can be used to
 predict future values of that variable.
 
-In example @ref{regression}, the service department of the company wanted to
+In the following example, the service department of the company wanted to
 be able to predict the time to repair equipment, in order to improve
 the accuracy of their quotations.
 It was suggested that the time to repair might be related to the time
@@ -891,61 +664,33 @@ was used.
 This command not only tests if the variables are related, but also
 identifies the potential linear relationship. @xref{REGRESSION}.
 
+A first attempt includes @exvar{duty_cycle}:
 
-@float Example, regression
-@cartouche
 @example
 @prompt{PSPP>} get file='@value{example-dir}/repairs.sav'.
 @prompt{PSPP>} regression /variables = mtbf duty_cycle /dependent = mttr.
-@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
-@end cartouche
-@caption{Linear regression analysis to find a predictor for
-@var{mttr}.
-The first attempt, including @var{duty_cycle}, produces some
-unacceptable high significance values.
-However the second attempt, which excludes @var{duty_cycle}, produces
-significance values no higher than 0.06.
-This suggests that @var{mtbf} alone may be a suitable predictor
-for @var{mttr}.}
-@end float
-
-The coefficients in the first table suggest that the formula
+
+@noindent This attempt yields the following output (in part):
+@psppoutput {tutorial7a}
+
+The coefficients in the above table suggest that the formula
 @math{@var{mttr} = 9.81 + 3.1 \times @var{mtbf} + 1.09 \times @var{duty_cycle}}
 can be used to predict the time to repair.
 However, the significance value for the @var{duty_cycle} coefficient
 is very high, which would make this an unsafe predictor.
 For this reason, the test was repeated, but omitting the
-@var{duty_cycle} variable.
-This time, the significance of all coefficients no higher than 0.06,
+@exvar{duty_cycle} variable:
+
+@example
+@prompt{PSPP>} regression /variables = mtbf /dependent = mttr.
+@end example
+
+@noindent
+This second try produces the following output (in part):
+@psppoutput {tutorial7b}
+
+This time, the significance of all coefficients is no higher than 0.06,
 suggesting that at the 0.06 level, the formula
 @math{@var{mttr} = 10.5 + 3.11 \times @var{mtbf}} is a reliable
 predictor of the time to repair.