Excercise-2 Sol
Excercise-2 Sol
Problem 1. An advantage of logit models is that the logistic pdf. can be written as a
combination of cdfs. Please show this claim!
Problem 2. Show that for a standard normally distributed random variable zi we have
φ(a)
E[z | z > a] = ,
1 − Φ(a)
P (z > a) = 1 − P (z ≤ a) = 1 − Φ(a)
Problem 3. Consider the binary response logit model. Assume that xi contains an inter-
cept. Show that y then coincides with the average estimated success probabilities based on
maximum likelihood estimator β.b
1
University of Bonn SoSe 2023
Department of Economics Christoph Breunig
Solution: From lecture notes we know that the log likelihood function is given by
X X
log L(β) = log F (x0i β) + log(1 − F (x0i β)).
yi =1 yi =0
and thus n n
X X
−1 −1
y=n yi = n Λ(x0i β)
b
i=1 i=1
where Λ(x0i β)
b = P (yi\
= 1 | xi ).
2
University of Bonn SoSe 2023
Department of Economics Christoph Breunig
where λ(a) = φ(a)/Φ(a). Why do we need additional information on z i for small values of
z i ? Provide a theoretical argument and plot the function in R.
φ(a) −aφ(a)
lim = lima→−∞ = lima→−∞ (−a)
a→−∞ Φ(a) φ(a)
In R:
a <− seq ( −10 , 1 0 , length . out = 1 0 0 )
>
> # C a l c u l a t e t h e v a l u e s o f p h i ( a ) and Phi ( a )
> p h i a <− dnorm( a )
> Phi a <− pnorm( a )
>
> # C a l c u l a t e t h e r a t i o p h i ( a ) / Phi ( a )
> r a t i o <− p h i a / Phi a
>
> # P l o t t h e graph
> plot ( a , r a t i o , x l a b = ” a ” , y l a b = expression ( p h i ( a ) / Phi ( a ) ) ,
> main = ” P l o t o f p h i ( a ) /Phi ( a ) ” )
> grid ( )
Suppose c1 and c2 are known constants. Write down the conditional log-likelihood function
of this model for a random sample {yi , xi }ni=1 .
Solution: Since yi is discretely distributed, the general form of the conditional log-
likelihood function is
n Y
3
! n X
3
Y X
1(yi =j)
log P (yi = j | xi ) = 1(yi = j) log(P (yi = j | xi )).
i=1 j=1 i=1 j=1
3
University of Bonn SoSe 2023
Department of Economics Christoph Breunig
Here
P (yi = 1 | xi ) = P (yi∗ ≤ c1 | xi )
= P (ui ≤ c1 − x0i β | xi )
c1 − x0i β
= Φ .
σ
Similarly
and
c2 − x0i β
P (yi = 3 | xi ) = 1 − Φ .
σ