Econometrics Eviews 6
Econometrics Eviews 6
Econometrics Eviews 6
TUTORIAL III
The third tutorial will deal with binary dependent variable models esti-
mation by Maximum Likelihood (Logit and Probit models) and by OLS
(linear probability model). We will analyse the interpretation of coef-
ficients and of marginal effects, some goodness-of-fit measures and we
will program an heteroskedasticity test based on Lagrance Multipliers
principle.
To this end we will use the data contained in the benefit.wf1 workfile (the
example is taken from Verbeek, chap. 7 which is based on McCall, 1995).
The variables refer to 4, 877 blucollars which have become unemployed
between 1982 and 1991. Only 68% of them have applied for unemploy-
ment benefits, so an interesting question is which are the determinants
of the choice of whether to apply or not for the benefit as a function of
some individual characteristics.
1
• dykids dummy, 1 if young kids (0-5 yrs);
The workfile also contains the variables blucollar (dummy, 1 for all
the observations) and state (51 different values, grouped in 9 categories).
among the estimation methods of the equation and then to select the
specific model (Probit, logit, extreme value)
Log likelihood
Restr. log likelihood
LR statistic (# df)
2
Probability(LR stat)
McFadden R-squared
3
4
5
1.1 Computation of the marginal effects
In a non-linear model, the object of interest is the marginal effects and
not the coefficients. In a binary dependent variable case we have:
∂P (yi = 1|xi )
= f (x0i β)βk (1)
∂xki
Notice however that the sign of the marginal effect is the same as the
sign of the coefficient. Notice also that the marginal effect is individual
specific (it depends on x0i ) and it can also be evaluated in a specific
sample point (average, median, minimum, maximum, etc.)
EViews does not provide directly the marginal effects. However, they
can be easily computed.
As a first step, estimate the value of x0i β (so called index function) for
each observation. It is sufficient to select:
Procs
Forecast (Fitted probability/index)
Example 1. Let yplogit and ypprobit be the names given to the index
functions and logistic and probit the names given to logit and probit equa-
tions; if we want to compute the marginal effect of the variable tenure,
the command to generate the series is for the probit and logit models,
respectively:
6
series marg age l = (@dlogistic(−yplogit)) ∗
((logistic.@coef (4)) + (2/10) ∗ (logistic.@coef (5)) ∗ age)
Marginal effects can also be evaluated in specific sample points (eg. ave-
rage). For instance, if we want to measure the marginal effect evaluated
observation by observation of the replacement ratio variable in the probit
model:
7
The Pseudo-R2 can instead be easily computed. For instance, the com-
mand to use for the probit model is:
ybi
0 1 T ot
0 n00 n01 n0 (8)
yi 1 n10 n11 n1
T ot N0 N1 n
By using the (8) it is possible to derive several goodness-of-fit measures.
Define with
n01 + n10
wr1 = (9)
n
the proportion of incorrect predictions for the general model. The cor-
responding statistics for the model in which all the parameters are set
equal to 0 can be easily computed. In fact if pbM L = nn1 > 21 then
n1
wr0 = 1 − (10)
n
n1 1
Instead, if pbM L = n
≤ 2
then
n1
wr0 = (11)
n
The goodness-of-fit measure can then be computed as
wr1 wr0 − wr1
Rp2 = 1 − = (12)
wr0 wr0
which shows it is a measure of the proportional decrease of incorrect
classifications when using the estimated model and not the restricted one
8
(with all the parameters set equal to 0), standardised by the proportion
of incorrect classifications in the restricted model.
view
Prediction-Expectation Evaluation
9
1.3 LM heteroskedasticity test
Consider the unrestricted model in latent form
yi∗ = x0i β + εi (15)
2
π
εi |xi , zi ∼ N ID(0, 1h(z0i α)) o ∼ LID(0, h(z0i α))
3
yi = 1 if yi∗ > 0
yi = 0 if yi∗ ≤ 0
where h is a differentiable function such that h(.) > 0, h0 (.) 6= 0 and
h(0) = 1. The restriction we want to test is
α=0 (16)
10
The loglikelihood function of the unrestricted model is
x0i β
X
log L(θ) = yi log F + (17)
i κh(z0i α)
x0i β
X
+ (1 − yi ) log 1 − F
i kh(z0i α)
where θ = (β 0 , α0 )0 and κ = 1 for the Probit model and κ = π3 for the Lo-
2
− λ̃ = 0 (18)
where the terms in square brackets are the generalised residuals of the
restricted model. If we neglect irrelevant constants, the S matrix in this
case is
0 G 0 b 0
εeG x (e
ε x β M L )z
1G 10 1 1
0 b
1
0
εe2 x2 εG
(e 2 x 2 β M L )z 2
S= (19)
0 0 b 0
εeGn xn εG
(en xn βM L )zn
Also in this case the null hypothesis can be tested by using the test
statistics
b0 S0 Sb 2
ξLM = n 0
= nR (20)
ii
= b0 S0 Sb (21)
Example 2. Test that the variance of the error is function of age in the
probit model.
11
To save the generalised residuals select:
Procs
Make residual series
The commands to use are then (save the auxiliary regression as “etero”):
12