Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Linear Regression
Main Dialog Box
To find the main regression dialog box, click on the Analyze menu item (labelled
statistics in older versions of SPSS).Then click Regression, and then Linear . . .You
should see something like Figure 1
2
C: Choose what plots you would like drawn.See below.
D: Choose what information you would like saving in your data file.See below.
E: Some additional options.See below.
F: OK. Press this when you have finished, to run the analysis.
G: Reset all values back to their defaults.Useful if you want to run a completely different
analysis.
H: Cancel and ignore any changes that have been made.
I: Help.Get some help.
J: These buttons move variables between the variable list on the left (A), and the
independent and dependent boxes (N and K).
K: The dependent variable.Use the button (J) to put your dependent variable into this
box.
L: Next block.This is used when carrying out hierarchical regression (see chapter 2) to
add variables in blocks.
M: The variable selection technique. Choices are enter, stepwise, remove, backward,
forward.See chapter 2.
N: The list of dependent variables.
Statistics Dialog Box
Figure 2 shows the dialog box that appears when you click the save button.
4
Plots Dialog Box
8
To create a new variable called logtime, which is the log of a variable called time:
In the target variable box, writelogtime.
In the numeric expression write log(time)
Press OK.
The Recode Dialog Box
The recode dialog box is used when we want to manipulate categorical variables.This is
most commonly done when we want to take a categorical variable with more than two
levels, and turn it into a series of dummy coded variables, to represent the variables (see
Chapter 3).
Imagine we had a categorical variable, called group, which had three possible
values.The value 0 indicates that the person is in the control group, 1 indicates they are in
group 1 and 2 indicates they are in group 2.We want to turn this into 2 dummy coded
variables, that represent membership of group 1 and group 2.(We do not need a third
variable to represent the membership of the control groups - see chapter 3 for an
explanation of why.We will call the two new dummy variables group_1, which will be
equal to 1 if the person is in group 1, and otherwise 0, and group_2, which will be
equal to 1 if the person is in group 2, and otherwise zero.Table 1 shows the possible
values of the three variables.
Table1
Group
0
1
2
group_1
0
1
0
group_2
0
0
1
The recode process has two steps.In the first step we tell SPSS what name we would like
the new variable to have.In the second step we tell SPSS what we would like the values
in the new variable to be.To Recode variables, first select the Transform menu, then
the Recode item, and then Into Different Variables . . .
Step 1: Name new variables.The dialog box to do this is shown in Figure 7.
Figure 7
A: The variable list, with which we are becoming familiar.
B: The button to move variables to and from the variable list
C: The list of old variables, linked to their new variables.
D: The list of new variables.Type the name of the new variable here, and then click
the Change button (F).In our example we would first type group_1 here.
E: Use this button to select the next dialog box, where we tell SPSS what values are to
change.
F: The Change button, adds the name of the variable that we have typed into D to the
output variable list, in C.
G: The OK button.You will not be able to press this until you have pressed button E, and
set old and new values.
Step 2: Tell SPSS the old and new values.The dialog box to do this is shown in Figure 8.
10
Figure 8
A: Here we say the value of the variable we want to recode.
B: Here we say the value we want to have in the new variable.
C: When we have filled in both A and B, click the Add button to add the recode to the
list.
D: Here we have the list of transformations that are to take place.In our example, when
we are coding the variable group_1, this should say:
0->0
1->1
2->0
Note that we need to do two runs through this procedure to create both of the dummy
variables.
11
E: Continue.Click this when you have finished.
12
Logistic Regression
The logistic regression procedure is more sophisticated than the linear regression
procedure, and automates some of the tasks that we had to do to prepare data for
categorical independent variables (see Chapter 3) and interactions (see chapter 6). To
select the logistic regression dialog, choose the Analyze menu (Statistics in some
versions of SPSS).Then choose the Regression item, and then Binary Logistic
(just Logistic in some versions).
The Logistic Regression Dialog Box
13
G: Here we can specify that variables are categorical.This saves us gong through the
procedure described in chapter 3, to create dummy variables.See below.
H: The save button.This allows us to save some information back to the dataset.See
below.
I: Options: See below.
The Categorical Variable Dialog Box
Figure 10
A: The variable list.
B: The list of categorical variables.If you have any categorical independent variables, you
can add them to this list.This saves going through the procedure that we described in
Chapter 3, to create dummy variables.
C: Here the type of coding is specified.These were described in Chapter 3.First you select
the reference category (first or last), and then the type of coding you would like to
use.The two main choices are Indicator coding, and what SPSS calls Simple coding,
which we described as Dummy coding in Chapter 3.
Save Dialog Box
The options in this box are very similar to the options that were available in the save
dialog box in Linear Regression.Most of the diagnostic checks that are available in
logistic regression are very similar to the checks that were available in linear regression,
which we dealt with in Chapter 4.We did not consider them specifically in terms of linear
regression though, and the reader is directed towards Menard (1995).
14
Figure 11
A: Predicted values.These are in terms of either probability of group membership, or
predicted group membership, based on a cut-off of 0.5.
B: Influence statistics.These are the equivalent of the influence statistics we encountered
for linear regression, in Chapter 4.
C: Residuals. Again these are similar to the residuals we encountered in Chapter 4.
Options Dialog Box
Figure 12
A: A series of diagnostic charts and indices are presented within this section.Most of
them are beyond the scope of this book.
B: The probabilities for stepwise entry and removal.
15
C: The 95% CI for B.This is calculated using the SE of B, as in linear regression.
D: The classification cut-off.This is used to determine predicted group membership.If the
probability of a person being in a group is greater than 0.5, the analysis predicts that they
will be in that group.
E: The maximum number of iterations that are allowed.On some occasions you may find
that the logistic regression does not converge, and therefore you may need to increase this
value.
Jeremy Miles and Mark Shevlin, 2000
Go Back to
Jeremy Miles Homepage
Applying Regression Analysis Homepage
Applying Regression Analysis Extras Page
Appendix 2 Page