= =
|
.
|
\
|
\
|
=
=
k ki i
i
i
i i
X
P
P
0
n
n
log L Logit
c | | + + =
|
|
|
|
.
|
\
|
<
=
<
=
k k c
c
i
i
c
i
i
c c
X
P
P
0
n
1
n
1
1
log L Logit
Logistic regression in SPSS
Choose Analyze >
Generalized Linear
Models
Logistic regression in SPSS
Choose Binary
logistic
A flexible tool with
many possible
model specifications
Logistic regression in SPSS
Choose dependent
variable
Choose reference
category, i.e. to
model P(not in ref.
category)
Logistic regression in SPSS
Choose predictors:
class variables
(factors) or
contiuous variables
(covariates)
Logistic regression in SPSS
Build model
Presenting changes in P(y=1) from logistic regression
results
Have estimated L=0.4+1.2X for X ranging from -4 to 10
Presenting changes in P(y=1) from logistic regression
results
Have estimated L=0.4+1.2X for X ranging from -4 to 10
Excercises (I)
a) You are interested in how peoples age influences their general feeling of happiness.
Use the XWVSEVS_1981_2000_v20060423.sav data set supplied under the PolEc
Dataset folder on Its Learning.
a) Create a new variable happy that takes on the value 1 if the individual in
question reports to be happy (very or quite) and 0 otherwise. Run a simple
binary logistic regression with happy as dependent variable and (continous) age
(x003) and the indivuals houshold income (x047) as independent variables.
Comment on the results and graph the realtionship between the probability of
being happy and age (Tip: Use descriptive analysis to find the minimum and
maximum of age, i.e. the range for which reasonable predictions of happiness
can be made, and graph the relationship holding income level constant at the
mean).
b) Redo the analysis with year of birth (x003) added to the model. Comment on the
results in the SPSS output and again graph the relationship between age and the
probability of being happy (holding both year of birth and income cosntant at
their respective means).
Analysis of panel data
0 it A Ait B Bi it
y X X e | | | = + + +
Given the correct model
A time-invariant covariate
1
0
1
N
k k
it A Ait i it
k
y X D e | | o
=
= + + +
=
= + + +