Page 126 Regression from chapter 6

get file 'c:cama4lung.sav'. compute ffev1a = ffev1/100. execute. regression /dependent ffev1a /method = enter fheight.

Page 128 Descriptive statistics at the bottom of the page

descriptives variables = fage fheight ffev1a.

Page 133 Covariance and correlation matrices

Covariance:

NOTE: Although the table below is labeled "Correlations" and is not in the same order as shown in the text, it is the correct table with the correct covariances.

regression /dependent ffev1a /method = enter fage fheight fweight /descriptives cov.

Correlation (page 134):

correlation /variables fage fheight fweight ffev1a.

Page 138 Table 7.1 ANOVA example from the lung function data (fathers)

regression /dependent ffev1a /method = enter fheight fage.

<some output omitted>

Page 140 The t-test at the top of the page

NOTE: This is given in the output from the above regression.

Page 150 Table 7.5 Statistical output for the lung function data for males and females

NOTE: To do the top part of the table, you need to reshape the data from wide to long. In SPSS, the command to do this is

varstocases. Also, the statistic called "S" in the text is labeled as "Std. Error of the Estimate" in the SPSS output.

varstocases /id = id1 /make age from fage mage /make height from fheight mheight /make fev1 from ffev1 mfev1 /index = Index1(2) /keep = fage mage fheight mheight ffev1 mfev1. compute fev1a = fev1/100. execute. regression /dependent fev1a /method = enter age height /descriptives mean stddev.

<some output omitted>

The second and third panels of the table.

NOTE: We use the

value labelscommand to label the newly created variablegenderfor clarity in the output. We use thesplit filecommand to split the data file bygenderto get the analyses for each gender. Thetemporarycommand is used so that thesplit filecommand does not permanently split the file; rather, the file is split only while the next command (in this case, theregressioncommand) is executed. We need to sort the data on the variable on which we will split the file, and we use thesort casescommand to do this.

value labels gender 1 "male" 2 "female". sort cases by gender. temporary. split file by gender. regression /dependent fev1a /method = enter age height /descriptives mean stddev.

Page 152 middle of the page

NOTE: The t-test for the

fhcoefficient is the relevant statistic. The sign is opposite of that shown in the text because the order of subtraction was reversed. Also, there is some rounding error.

compute female = gender - 1. value labels female 0 "male" 1 "female".

compute fa = female*age. compute fh = female*height. exe.

regression /dependent ffev1a /method = enter female age height fh.

<some output omitted>

page 153 middle of the page

NOTE: The first line of the output for model 2 provides the F test.

regression /dependent ffev1a /method = enter age height /method = test(female fa fh).

<some output omitted>