Takehome Final Project Due day: Jan 8, 2020
December 16, 2019
The Orst question is to estimate the multinomial Probit Model MNP: Suppose there are n consumers in the market, i 1; 2; :::; n. Each of them makes comsumption decision according to her indirect utility of commodities and the consumer picks up the commodity associated with largest indirect utilities. Let Xij Xij1; :::; XijpT denote a vector of observed characteristics of commodity j for consumer i, e.g., priceij is the trading price of j for consumer i. For simplicity, in this question we assume Xij is scalar p 1. The indirect utility is assumed to be linearly separable, namely, the random utility of i choosing j follows
Uij 0j 1jXijuij Vijuij
where Vij is the deterministic utility towards researchers and uij captures the demand shock or unobserved evaluation of utilities of commodity j for consumer i which is generally unknown to the researchers but known to the consumers. In this exercise, j 0; 1; 2; 3, i.e., there are 4 commodities. For the normalization purpose, we also assume Vi0 0, 0 is the outside choice.
According to the utility maximization, people choose commodity j if it maximizes their indirect utilities,
Yi j iUij Ui;j
The data observed for research are fYi;Xigni1 where Yi 2 f0;1;2;3g Xi fXijg3j0.
For the choice behavior, speciOcally, 1.
Yi 0i
ui0 ui0 ui0
01 11Xi1ui1 02 12Xi2ui2 03 13Xi3ui3
1
which is equivalently
which is equivalently
2110032ui03 2 X 3
56ui17 401 11i15 1010 4ui25 0212Xi2
1 0 0 1 u 03 13Xi3 M0 0X;
2.
4
z i3 z
Yi 01 11Xi1 ui1 01 11Xi1 ui1 01 11Xi1 ui1
1i ui0
2110032ui03 2
56ui17 4 0 1 1 0 4ui2 5
0 1 0 1 u
M1 1X;
02 03
12Xi2ui2 13Xi3ui3
4
zi3 z
01 01
02 11Xi1 12Xi2 03 11Xi1 13Xi3
X3 0111i1 5
3.
which is equivalently
Yi 02 12Xi2 ui2 02 12Xi2 ui2 02 12Xi2 ui2
2i ui0
2101032ui03 2
56ui17 4 0 1 1 0 4ui2 5
0 0 1 1 u
M2 2X;
01 03
11Xi1ui1 13Xi3ui3
4
zi3 z
02 02
01 12Xi2 11Xi1 03 12Xi2 13Xi3
X3 0212i2 5
4.
Yi 03 13Xi3 ui3 03 13Xi3 ui3 03 13Xi3 ui3
2
3i
ui0
01 11Xi1ui1 02 12Xi2ui2
which is equivalently
2100132ui03 2
X 3 03 13i3 5
56ui174 0 1 0 1 4ui2 5
4
zi3 z
0 0 1 1 u
M3 3X;
03 01 13Xi3 11Xi1 03 02 13Xi3 12Xi2
model, we further assume the ui ui0; ui1; ui2; ui3T are joint uiN0;
normal
In Probit
identically for all i, i.e.,
where for the purpose of identiOcation of parameters , the variancecovariance matrix follows
Ln jX; Y
Pr M0u 0 Xi; b jXi1fYi0g Pr M1ui 1 Xi; b jXi1fYi1g Y Pr M2ui 2 Xi; b jXi1fYi2g Pr M3ui 3 Xi; b jXi1fYi3g
Yn i1
n i1
210003
6 0 1 0 0 7 ; 2 0; 1
40015 001
and this covariance matrix captures the correlations among dierent choices of com modities. In this speciOcation, the unobserved characteristics of choice 2,3 are pos itively correlated. Since ui is normally distributed and Mju should also be joint normal with covariance matrix j VarMju. Since all the observations are i.i.d.
draw from the above MNP. The likelihood function of the parameters bT ; T can be written as
0 0 Xi; b1fYi0g 1 1 Xi; b1fYi1g 2 2 Xi; b1fYi2g 3 3 Xi; b1fYi3g
is the CDF of multivariate normal distribution with 0 mean and covari argmaxlogLn jX;Y 1
2
a Simulate DGP: n 500; Xij Unif2; 2 i.i.d. across i and j; 0:5;
i. 0j 1 and 1j 0:5 which are known to be identical across j research knows s are identical
ii. 01 1 and 02 03 0:5; and 11 Unif0;1 and 12 13 Unif0;1 b Specify j VarMj u, j 0; 1; 2; 3 and discuss of the identiOcation of
3
where
ance . Therefore the MLE of solves the following optimization problem
c In case i, assume is unknown, then estimate 0; 1; according to 1. The maximization of log Ln jX; Y can be implemented using proOled procedures:
given
0 ; 1 arg max log Ln b0; b1; jX; Y 2 b0 ;b1
and then solve for according to
arg max logLn0;1;jX;Y
20;1
case ii, assume is known to be 0:5 0:5 and you are required to solve
01; 02; 11 and 12 sinceitisknownthat 02 03; 12 13by max log Ln b01; b02; b11; b12jX; Y
b01 ;b02 ;b11 ;b12
Repeating drawing data from DGP as well as your estimation 100 times and
report the mean and standard deviation of your estimates of ; . Hints:
a The conditional choice probability CCP, j j Xi;b, should be evaluated and calculated using GHK sampler do NOT use computer package
b In calculate the proOled MLE, the inner loop of 2 could be conducted through NelderMead algorithm since the gradients of multivariate normal CDF wonit be easily obtained. could be estimated through line search in an interval 0; 1
QuasiMCMC for Quantile Regression: Similar to the model we considered in class, we aim to estimating the following quantile regression model
YiXiT Ui
For simplicity, X ? U Unif0; 1 and we assume for any give x 2 X , quantile function
:! xT is increasing in , then
PrYi XiT jXi PrXiT Ui XiT jXi
PrUi that is the quantile function of Y given X is
Q YijXi XiT
The quantile regression can also be written as an additive model:
Y X0 X0 U X0
4
and in median regression, write is short for 0:5 and similarly is short for 0:5, so Yi Xi0 i. A typical example will be linear locationscale model:
suppose X Unif0; 1 ? N 0; 1,
Y 0 1X1X
0 1X1X1U
01U 11UX
And can be obtained by minimizing a check loss function
argminE Yi Xi0b 3
b2B
where u 1 fu 0g u, when 0:5, 0:5 u juj. Therefore, 3 teaches
us in the Onite sample
argminXn YiXi0b 4 b2B i1
For b 2 Rp, deOne residual ri b Yi XiT b, then
1Xn YiXi0b 5
where Fn u; b the empirical CDF of ri b 1 Xn
Zn i1
u dFn u; b
Fnu;b n 1fribug i1
since both empirical CDF and is not smoothed, Fernandes, Guerre Horta, 2019 considers a way of smoothing the Fn u; b which leads to a smoothed objective functions. The idea is following:
1. Smooth Fn u; b by some kernel functions K Zu
where
Xn fht;b 1 K trib
Fnh u;b fh t;bdt 1
nh i1 h
and K is a symmetric density kernel function and h is the corresponding bandwidth that shrinks to 0 as n ! 1.
5
2. Replace Fn u;b by Fnh u;b and redeOne the objective function for be shown that
where
and it can
6
hu uKutudt
which is so called Convolutiontype smoothing of objective function 5
3. If K u up.d.f. of N 0; 1, it can also be shown that
u dFnh u; b ZXn
1 hYiXiTb n i1
Z
where
hui 1EjZu;hj1u;Zu;h Nu;h2 22
1hG u 1 u 2h2
212 x2
exp 2 x 1 2 x ; is CDF of N 0; 1
G x
a Fernandes, Guerre Horta 2019, Journal of Business and Economic Statis tics Simulate the following DGP and estimate ; 0:5 by minimizing 6
Y X1 X2 0:50:51UX3 0:50:51U0:51U
where U Unif0; 1, X1 N 0; 2 ; X2 and X3 unif0; 1, they are mutually independent. Try two dierent sample sizes n 200; 400
The optimization can be implemented through QuasiNewtonis methods or Gra dient descending algorithm. Also repeating drawing data from same DGP as well as your estimation 200 times and report the mean and standard deviation of your estimates
b Chernozhukov and Hong 2003, Journal of Econometrics The typical quantile regression could be directly obtained through minimizing 5. One standard procedure is to use linear programming with innerpoint iteration. While an alternative method that deals with 5 is to simulate from its quasiposterior function using MCMC. DeOne the posterior density function of
Xn 0! Lnbjdataexp YiXib
i1
6
and
pbjdata R XPn !
b exp Pni1 Yi Xi0b bexp i1 Yi Xi0bdb
n0 bexp YiXib
i1
where b is prior distribution of Zb which is assumed to be unif10; 10 and
p bjdata db
calculate through MCMC sampling from pbjdata b1;:::;bM and report b average bc; :::; bM ; c is some positive number, e.g., c 1000; M 20000 after some burnin process m c. Please also plot your sampling path b1; :::; bM Hints: random walk proposal Using N ; 2 as proposal density, 2 is the tuning parameter that could be adjusted during the sampling procedure. How are the results if repeating MCMC 100 times with independent sampling from DGP in a?
c Optional Koenker 2005 Quantile Regression, Econometric Society Mono graph Series Estimate according to 4 using Linear programming with inte rior point algorithm Mehrotrais predictorcorrector method 1992 and com pare your results with ab. Hints: A good reference for the computation aspect of quantile is http:www.econ.uiuc.edurogerresearchrqrq.html
7