Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: estout a matrix


From   Nirina F <fstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: estout a matrix
Date   Tue, 17 Feb 2009 14:37:21 -0500

Thank you very much Martin and Ben for your responses. I am sorry I
was away last week so couldn't check your responses.
I will try your suggestions.
My apologies for not having thought of sending the link of ivtest.
Best regards,

Nirina

On Tue, Feb 10, 2009 at 4:36 AM, Ben Jann <ben.jann@gmail.com> wrote:
> Martin wrote:
>> Look at the last page of
>> http://www.tulane.edu/~economic/RePEc/pdf/tul0901.pdf for the returned
>> results...
>
> Ok, -ivtest- seems to return the results as r() scalars and macros. To
> add, say, the CLR statistic and its p-value, type
>
> . use http://fmwww.bc.edu/ec-p/data/hayashi/griliches76.dta
> . eststo q1:  ivreg2 lw s expr tenure rns smsa  (iq=med kww age mrt), robust
> . ivtest, ci
> . estadd scalar r(clr_p)
> . estadd scalar r(clr_stat)
> . eststo q2:  ivreg2 lw s expr tenure rns smsa  age mrt (iq=med kww), robust
> . ivtest, ci
> . estadd scalar r(clr_p)
> . estadd scalar r(clr_stat)
> . estout q1 q2, cells(b(star fmt(3)) se(par) ) stats(r2_a N widstat jp
> clr_p clr_stat, fmt(3))
>
> The confidence sets seem to be returned as string macros. To display
> them in -estout- type, e.g.,
>
> .estadd local clr_cset = r(clr_cset)
>
> and then
>
> . estout q1 q2,  ... stats(... clr_cset)
>
> ben
>
>> On Tue, Feb 10, 2009 at 12:25 AM, Nirina F <fstata@gmail.com> wrote:
>>> Hello,
>>> I am not very familiar with estout.
>>> My questions are:
>>> 1-how do I put the matrix results from my ivtest below after my
>> regressions?
>>> 2-When I use append, the second equation result is reported under the
>>> first equation. I saw that I could do estout eq1 eq2 but that means I
>>> have to also name the matrices from ivtest after eq2 differently to be
>>> put under eq2?
>>>
>>> . use http://fmwww.bc.edu/ec-p/data/hayashi/griliches76.dta
>>>
>>> . eststo q1:  ivreg2 lw s expr tenure rns smsa  (iq=med kww age mrt),
>> robust
>>>
>>> . ivtest, ci
>>>
>>> Weak instrument robust tests and confidence sets for linear IV
>>> H0: beta[lw:iq] = 0
>>>
>>>
>> ----------------------------------------------------------------------------
>> -----------------------------------------
>>>  Test |      Statistic               p-value
>>>     95% Confidence Set
>>>
>> ------+---------------------------------------------------------------------
>> -----------------------------------------
>>>  CLR | stat(.)  =    57.03   Prob > stat =   0.0000
>>>    [-.257136,-.039481]
>>>   AR | chi2(4)  =    91.35   Prob > chi2 =   0.0000
>>>         null set
>>>   LM | chi2(1)  =    18.20   Prob > chi2 =   0.0000
>>> [-.4880471,-.0349708] U [ .0093415, .0202192]
>>>    J | chi2(3)  =    73.15   Prob > chi2 =   0.0000
>>>  LM-J |           H0 rejected at 5% level
>>>
>> ------+---------------------------------------------------------------------
>> -----------------------------------------
>>>  Wald | chi2(1)  =     4.90   Prob > chi2 =   0.0269
>>>    [-.021772,-.001322]
>>>
>> ----------------------------------------------------------------------------
>> -----------------------------------------
>>> Note: Wald test not robust to weak instruments. LM-J confidence set
>>> not available with closed-form estimation (use
>>> usegrid option).
>>>
>>> estout using ivequ.xls,  cells(b(star fmt(3)) se(par) )  stats(r2_a N
>>> widstat jp, fmt(3))
>>>
>>> eststo q2:  ivreg2 lw s expr tenure rns smsa  age mrt (iq=med kww), robust
>>>
>>> ivtest, ci
>>>
>>>
>>> Weak instrument robust tests and confidence sets for linear IV
>>> H0: beta[lw:iq] = 0
>>>
>>>
>> ----------------------------------------------------------------------------
>> -----------------------------------------
>>>  Test |      Statistic               p-value
>>>     95% Confidence Set
>>>
>> ------+---------------------------------------------------------------------
>> -----------------------------------------
>>>  CLR | stat(.)  =     0.03   Prob > stat =   0.8628
>>>    [-.009783, .010634]
>>>   AR | chi2(2)  =     2.62   Prob > chi2 =   0.2694
>>>   [-.0089519, .0099214]
>>>   LM | chi2(1)  =     0.03   Prob > chi2 =   0.8673
>>> [-.0100928, .0108969] U [ .1412529, 1.348119]
>>>    J | chi2(1)  =     2.60   Prob > chi2 =   0.1072
>>>  LM-J |         H0 not rejected at 5% level
>>>
>> ------+---------------------------------------------------------------------
>> -----------------------------------------
>>>  Wald | chi2(1)  =     0.05   Prob > chi2 =   0.8205
>>>    [-.008054, .010162]
>>>
>> ----------------------------------------------------------------------------
>> -----------------------------------------
>>> Note: Wald test not robust to weak instruments. LM-J confidence set
>>> not available with closed-form estimation (use
>>> usegrid option).
>>>
>>>
>>> estout using ivequ.xls, append cells(b(star fmt(3)) se(par) )
>>> stats(r2_a N widstat jp, fmt(3))
>>>
>>>
>>>
>>> Thank  you,
>>> Nirina
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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