Statalist The Stata Listserver

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

st: Re: diagnostics for the treatreg procedure

From   "Rodrigo A. Alfaro" <>
To   <>
Subject   st: Re: diagnostics for the treatreg procedure
Date   Mon, 28 Aug 2006 11:06:37 -0400

Hi Mark,

Interesting conversation. I have a question about the procedure. 
It seems to me that Yang wants to do ML instead of two-step IV.
Why he wants that? The two-step IV does not require that probit
should be corretly specified in compare with ML. In other words,
he could solve the problem via-ML with a logit!!


----- Original Message ----- 
From: "Schaffer, Mark E" <>
To: <>
Sent: Sunday, August 27, 2006 8:40 PM
Subject: st: diagnostics for the treatreg procedure

Dear Statalisters:

I had the following off-list conversation about how to generate an
overid stat for a treatreg estimation.  It occurred to me that it might
be of general interest, so I'm posting it here.

Both I and my correspondent would be very interested in any comments
other Statalisters might have.


>>>>-----Original Message-----
>>>>From: Yang Lu []
>>>>Sent: 26 August 2006 02:52
>>>>To: Schaffer, Mark E
>>>>Subject: diagnostics for the treatreg procedure
>>>>Hi, Mark,
>>>>I saw your post on STATA list about the overidentification test for 
>>>>treatreg regression. You mentioned you had programmed one. I am 
>>>>wondering whether you could kindly share it with me, when you fell 
>>>>comfortable. Thanks a lot.

>>Schaffer, Mark E wrote:   
>>>If I'm not mistaken, the overid test for treatreg is actually pretty 
>>>easy to do by hand for the ML version.  The trick is to do an LR test
>>>of the overidentifed treatreg system of interest vs. a
>>>Using the example from the manual, say you estimate
>>>treatreg ww wa cit, treat(wc=wmed wfed)
>>>There's one endogenous variable in the outcome equation, and 4
>>>restrictions: wa and cit don't appear in the treatment eqn, and wmed 
>>>and wfed don't appear in the outcome equation.  There's also one more
>>>identifying restriction, namely normality in the treatment (probit)
>>>To get a test of your 4 overidentifying/exclusion restrictions, just
>>>an LR test of the above vs. a just-identified system with no
>>>restrictions.  The single identifying restriction is normality.  Thus
>>>use, replace
>>>gen wc=(we>12)
>>>treatreg ww wa cit, treat(wc=wmed wfed) est store troverid
>>>treatreg ww wa cit wmed wfed, treat(wc=wmed wfed wa cit) est store 
>>>lrtest troverid trjustid, df(4)
>>>will give you an overid test for this example.

>>Hi, Mark,
>>Thanks a lot for your reply. I really appreciate it. My question is 
>>slightly different from the one you just mentioned. In the treatment 
>>model, I have one endogenous variable and 3 instrument variables. I am

>>trying to do the Sargan type overidentification test to show the 
>>validity of the instruments. My model is as follows:
>>treatreg y x1 x2 x3, treat(dummy=iv1 iv2 iv3 x1 x2 x3)
>>Notice that I have already included x1 x2 x3 in my selection model. So

>>in this case, I do test as follows:
>>treatreg y x1 x2 x3, treat(dummy=iv1 iv2 iv3 x1 x2 x3) est store 
>>treatreg y iv1 iv2 iv3 x1 x2 x3, treat(dummy=iv1 iv2 iv3 x1 x2 x3) est

>>store trjustid
>>lrtest troverid trjustid, df(2)
>>Is this the correct test to show the validity of instruments, like the

>>Sargan test? Thanks a lot.

Schaffer, Mark E wrote:

>Hi Yang.  You are doing ML estimation of a system, so the term "Sargan 
>test" is probably inappropriate - Sargan developed his statistic in the

>context of IV/2SLS estimation.  The corresponding ML test for single 
>eqn estimation is the Anderson-Rubin statistic for LIML.  I don't think

>the ML statistic for a system has a name per se.  But all these tests 
>are basically the same thing.
>In the example I sent you, there were 5 identifying restrictions - two 
>exclusions from each eqn, plus the normality assumption.  The test I 
>sent was a test of the 4 overidentifying restrictions in the system, 
>the normality assumption being maintained.  The test has 4 dofs since
>Your example is a special case, since you have exclusions from only the

>outcome equation.  You have 4 identifying restrictions: the 3 
>exclusions plus the 1 normality assumption.  The test in your example 
>is done correctly, except that there should be 4-1=3 dofs.
>Can I share this with Statalist?  I should have replied to the list 
>with your first email.  It's the kind of thing that is of general 
>interest, plus if I've made a mistake, someone may spot it.
>Prof. Mark Schaffer
>Director, CERT
>Department of Economics
>School of Management & Languages
>Heriot-Watt University, Edinburgh EH14 4AS tel +44-131-451-3494 / fax 

*   For searches and help try:

*   For searches and help try:

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