Hello All,
I am having some trouble figuring out how to extend
the Murphy-Topel correction for standard errors in a
two-step model with an ordered probit in the first
stage and a logit in the second stage.
I have been trying to adjust the code available in
Arne Risa Hole's paper, "Calculating Murphy-Topel
variance estimates in Stata: A simplified procedure."
I am not sure how to calculate the matrix C in the
formula for the Murphy-Topel variance estimate given
by V2 + (V2 * (C*V1*C' - R*V1*C' - C*V1*R') * V2).
* y takes on three values: 0,1,2
* q takes on two values: 0,1
* first stage regression
oprobit y x1 x2 x3 z, score(s1 a1 a2)
predict double yhat1 yhat2 yhat3
predict xb, xb
matrix V1 = e(V)
gen a1_s = a1/s1
gen a2_s = a2/s1
* second stage regression
logit q x1 x2 x3 yhat2 yhat3, score(s1)
matrix V2 = e(V)
scalar zz1 = _b[yhat2]
scalar zz2 = _b[yhat3]
* correct standard errors
gen byte cons = 1
/*****I AM NOT SURE HOW TO CALCULATE THE MATRIX C
--> in particular, how should I deal with the 2
estimated coefficients (zz1 and zz2)?
*/
matrix accum C = x1 x2 x3 a1_s a2_s x1 x2 x3 cons /*
*/ [iw=s2*s2*normalden(xb)*zz1], nocons
matrix accum R = x1 x2 x3 a1_s a2_s x1 x2 x3 cons /*
*/ [iw=s2*s1], nocons
* desired partition
matrix C = [6..9,1..5]
matrix R=[6..9,1..5]
* Murphy-Topel
matrix M = V2 + (V2 * (C*V1*C' - R*V1*C' - C*V1*R') *
V2)
matrix b = e(b)
ereturn post b M
Any advice would be greatly appreciated! Is there an
easier way to calculate a 2SLS model with a ordered
probit (or ordered logit) in the first stage? Or, if
anyone has coded this with a multinomial logit in the
first stage, I would be very glad to see the code.
Thanks so much!
Xinyi
____________________________________________________________________________________
Expecting? Get great news right away with email Auto-Check.
Try the Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/