Page 120 Regression from chapter 7
get file 'c:pma5lung.sav'. compute ffev1a = ffev1/100. execute. regression /dependent ffev1a /method = enter fheight.
Page 122 Descriptive statistics in the middle of the page
descriptives variables = fage fheight ffev1a.
Page 127 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 127):
correlation /variables fage fheight fweight ffev1a.
Page 132 Table 7.2 ANOVA example from the lung function data (fathers)
regression /dependent ffev1a /method = enter fheight fage.
<some output omitted>
Page 134 The t-test at the top of the page
NOTE: This is given in the output from the above regression.
Page 145 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 labels command to label the newly created variable gender for clarity in the output. We use the split file command to split the data file by gender to get the analyses for each gender. The temporary command is used so that the split file command does not permanently split the file; rather, the file is split only while the next command (in this case, the regression command) is executed. We need to sort the data on the variable on which we will split the file, and we use the sort cases command 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 147 middle of the page
NOTE: The t-test for the fh coefficient 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 148 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>