11.2 - Example

11.2 - Example

We will refer to the Exam Data set, (Exam.MTW or Exam.XLS), that consists of random sample of 50 students from a previous introduction to statistics course. We will use the variable Final as the response, and include the variables, Quiz Average, Midterm, and Gender as the predictors.

Since Gender is recorded as text, we need to first code Gender into a dummy variable.

To recode a text variable to a dummy variable in Minitab:

  1. Import data into Minitab
  2. Data > Code > Text to NumericGo to Transform > Recode Into Different Variables
  3. Enter Gender into the text box for Code Data From Columns
  4. Type the word DummyGender into the text box for Store Coded Data In Columns
  5. In the first text box under Original Values type in Female and in the first text box under New type the number 0
  6. In the second text box under Original Values type in Male and in the second text box under New type the number 1
  7. Click OK

minitab output

To recode a text variable to a dummy variable in SPSS:

  1. Import data into SPSS
  2. Since the variable Gender has text responses (i.e. Male, Female) we need to recode this variable into a numeric. We will use 1 to represent Male and 0 for Female.
  3. Go to Transform > Recode Into Different Variables
  4. Enter Gender into the Output Variable Window
  5. In the text box under Output Variable labeled Name: enter DummyGender
  6. Click Change
  7. Click the button Old and New Values
  8. Under Old Value click Value and type in Male
  9. Under New Value enter in the Value text box the value 1
  10. Under Old ? New click Add
  11. Repeat steps 8 through 11 typing in Female and 0
  12. Click Continue
  13. Click OK (you should now have a new column of ones and zeroes titled Male)

spss output

NOTE: Software is case sensitive. This means that you have to enter the text variable exactly as it appears in the worksheet. Here, for example, Female uses a capital F. If you used lower case for female the DummyGender would include missing data (i.e. an *) for where Gender was Female. Also, notice that DummyGender is entered as one word and not two words.

With the data set open, do the following:

  1. From the menu bar select Stat > Regression > Regression
  2. With the cursor in the Response box double click on Final from the list of variables. After making this selection the cursor should automatically move to the Predictors window
  3. With the cursor in the Predictors window double click on Quiz Average, Midterm, and DummyGender. This should move these variables into the Predictors window.
  4. Click OK

The output is as follows:

Regression Analysis

The regression equation is
Final = 12.6 + 0.731 Quiz Average + 0.024 Midterm − 1.26 DummyGender

Predictor
Coef
StDev
T
P
Constant
12.64
15.26
0.83
0.412
Quiz Average
0.7307
01653
4.42
0.000
Midterm
0.0237
0.1934
0.12
0.903
DummyGender
−1.259
2.487
−0.44
0.661

 

S = 9.89832 R−Sq = 37.3% R−Sq(adj) = 33.2%

Analysis of Variance

Source
DF
SS
MS
F
P
Regression
3
2683.79
849.60
9.13
0.000
Residual Error
46
4506.93
97.98
Total
49
7190.72

To perform a multiple linear regression analysis in SPSS:

  1. Open SPSS without data
  2. Click Analyze > Regression > Linear
  3. Click the variable Final and move to the text box for Dependent
  4. Click the variables Quiz_Average, Midterm, DummyGender and move to the text window for Independent(s)
  5. Click OK

The output is as follows:

spss output

spss output

spss output


Legend
[1]Link
Has Tooltip/Popover
 Toggleable Visibility