Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: IV with oprobit / mprobit?


From   "Tobias Hofmann" <hofmannt@gmail.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: IV with oprobit / mprobit?
Date   Wed, 15 Mar 2006 17:26:00 +0100

Dear Brian, dear all,

Thanks for your quick response!

Not knowing what exactly Bart was looking for, I envisioned - as you
correctly assumed - a model in which the endogenous regressor is an ordered
categorical variable and the dependent variable is continuous (i.e. the
first stage is fitted via -oprobit- and the second stage via -regress-).

Now, my follow-up question referred to the corrected standard errors from
the second stage regression. By elaborating on the code provided (see
below), how could the corrected standard errors be "made" robust (as Stata
would do if you added the -, robust- or -, cluster(var)- options to an
existing/implemented estimation command) in a simple way.

Your guess that the treatment effects literature may have something to say
about that is most probably correct. Being a novice to this literature, I'm
wondering whether you could provide me with a couple of more precise
references? Thanks!

Best regards,
Tobias
 
     
clear     
sysuse auto    
xtile y2 = mpg, nq(3)     
quietly tab y2, gen(y2_)    
rename price y1     
rename trunk z    
rename weight x    
* First-stage ordered probit:     
oprobit y2 z x      
predict p1 p2 p3, p    
* Second-stage OLS:   
regress y1 p2 p3 x    
* Correction of standard errors:     
drop p2 p3    
rename y2_2 p2     
rename y2_3 p3    
predict residuals, resid    
replace residuals = residuals^2     
quietly sum residuals      
scalar realmse = r(mean)*r(N)/e(df_r)    
matrix bmatrix = e(b)    
matrix Vmatrix = e(V)    
matrix Vmatrix = e(V) * realmse / e(rmse)^2     
ereturn post bmatrix Vmatrix, noclear     
ereturn display    
clear    
     

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu On Behalf Of Brian P. Poi
Sent: Wednesday, March 15, 2006 4:38 PM
To: statalist@hsphsun2.harvard.edu
Subject: RE: st: IV with oprobit / mprobit?

On Wed, 15 Mar 2006, Tobias Hofmann wrote:

> Dear Bart, dear all,
>
> Please read this e-mail even if you are not interested in my response 
> to Bart's question as you might be in the position to answer my 
> follow-up question. ;-]
>
> There seems to be no ado-file like IVoprobit or IVmprobit. However, 
> you should be able to do something like that "by hand". I'm certainly 
> not expert on this field, but here is an example of how such a "self 
> made" code could look like:

   (message trimmed)

> * First-stage ordered probit:
> oprobit y2 z x
> predict p1 p2 p3, p
> * Second-stage OLS:
> regress y1 p2 p3 x

   (message trimmed)

>
> Now, here is/are my follow-up question(s):
>
> a) What would the above code have to look like if I wanted Stata to 
> return ROBUST corrected standard errors, i.e. if I wanted to use the 
> Huber/White/sandwich estimator of variance?
>
> b) What would it have to look like to use clustering, let's say, using 
> the variable "foreign" to specify to which group each observation belongs?
>

Tobias,

First, note that the two-step variant of the official Stata command
-ivprobit- runs linear regression in the first stage, and probit in the
second stage.  That is, there is one or more continuous endogenous
regressors in a model where the dependent variable is dichotomous.

In your program, the first stage is fit via -oprobit- and the second stage
via -regress-, which implies to me that you are envisioning a model in which
the endogenous regressor is an ordered categorical variable and the
dependent variable is continuous.

If you are interested in a model like -ivprobit- with an ordered dependent
variable, then the two-step estimator of Rivers and Vuong for probit (1988,
Journal of Econometrics) could probably be extended in a straightforward
way.  Newey's efficient estimator (1987, Journal of
Econometrics) might also be a viable option, though it would a bit more work
to code, since it makes use of a two-step estimator like Rivers and Voung's.
The maximum likelihood estimator as used by -ivprobit- could also be
generalized.  (These ideas should be taken as conjecture -- in principle
they should work, though I haven't done the algebra to guarantee that they
will work or are practical to implement.)

If, on the other hand, you mean a model where the endogenous regressor is an
ordered categorical variable, then I don't have anything to add, other than
a guess that the treatment effects literature may have something to say.

HTH

    -- Brian Poi
    -- bpoi@stata.com

*
*   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/



© Copyright 1996–2020 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index