***************************************************************************** * CHAPTER 3 - STATISTICS FOR BUSINESS AND ECONOMICS, 5th Edition * ***************************************************************************** * Example 3.1, p. 56 * READ(STUDGPA.DIF) / DIF * * Plot Figure 3.2, p. 57 * * The SET SKIPMISS command is to turn on automatic deletion of missing * observations in the data analysis. The default missing value code is * -99999. * SET SKIPMISS PLOT GPA SATVERB SET NOWARNMISS GRAPH GPA SATVERB * DELETE / ALL *---------------------------------------------------------------------------- * Example 3.2 , p. 58 * SAMPLE 1 100 READ(INCVSED.DIF) / DIF * * Plot Figure 3.3, p. 58 * PLOT INCOME EDUC GRAPH INCOME EDUC * DELETE / ALL *---------------------------------------------------------------------------- * Example 3.3, p. 59 * SAMPLE 1 90 READ(CITYDAT.DIF) / DIF PLOT TAXBASE COMPER GRAPH TAXBASE COMPER * DELETE / ALL *---------------------------------------------------------------------------- * Example 3.4, p. 63 * * Read this example carefully. Be sure you understand the methodology. * *---------------------------------------------------------------------------- * Computer Computation of Regression Coefficients, p. 66 * SAMPLE 1 112 READ(STUDGPA.DIF) / DIF STAT GPA SATVERB SET SKIPMISS SET NOWARNMISS * * Plot Figure 3.11, p. 67 * PLOT GPA SATVERB GRAPH GPA SATVERB * * Figure 3.12, p. 68 * OLS GPA SATVERB / ANOVA LIST * DELETE / ALL *---------------------------------------------------------------------------- * Using Microsoft Excel PHStat to Obtain Regression Output, p. 69 * SAMPLE 1 90 READ(CITYDAT.DIF) / DIF * * Figure 3.13 and 3.14, p. 69 * OLS TAXRATE COMPER * DELETE / ALL *---------------------------------------------------------------------------- * Example 3.5, p. 70 * SAMPLE 1 3 READ TOOLS LUMBER PAINT NONE 100 50 50 50 50 95 45 60 65 70 75 40 * * The SUMS= option onthe STAT command saves the sum of the variable specified * in the constant. * STAT TOOLS / SUMS=SUMT STAT LUMBER / SUMS=SUML STAT PAINT / SUMS=SUMP STAT NONE / SUMS=SUMN * * The DIM command is used to dimension a vector called TOTAL with 3 rows. * The format of the DIM command is: * * DIM var size var size ... * * where: var = the name of the vector or matrix * size = either one or two numbers separated by a space to * indicate the size of the var to be dimensioned. * * The DO-loops perform repeat operations. In the example below, the cross * tables TOTALs in last column of Table 3.1 needs to be calculated using * the DO-loop. The format of the DO-loop is: * * DO dovar=start,stop,inc * commands * .... * ENDO * * The statements between the DO and ENDO commands are repeatedly executed. * The dovar variable is the loop variable and this must be set as a symbol * such as #, %, ! or ?. * DIM TOTAL 3 DO #=1,3 GEN1 TOTAL:#=TOOLS:#+LUMBER:#+PAINT:#+NONE:# PRINT TOTAL:# ENDO STAT TOTAL / SUMS=STOTAL PRINT SUMT SUML SUMP SUMN STOTAL * DELETE / ALL *---------------------------------------------------------------------------- * Example 3.6, p. 71 * SAMPLE 1 8 READ C1 C2 C3 C4 22.0 25.0 17.0 14.0 28.2 32.1 21.8 17.9 11.0 3.0 9.0 1.0 45.8 12.5 37.5 4.2 45.0 16.0 11.0 10.0 54.9 19.5 13.4 12.2 42.0 10.0 6.0 0.0 72.5 17.2 10.3 0.0 * * The DO-loop is used to calculate the numbers for the column labelled TOTAL. * DO ?=1,8 GEN1 TOTAL?=C1:?+C2:?+C3:?+C4:? PRINT TOTAL? ENDO * *---------------------------------------------------------------------------- * STOP