Statalist


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

Re: st: estout a matrix


From   Ben Jann <[email protected]>
To   [email protected]
Subject   Re: st: estout a matrix
Date   Tue, 10 Feb 2009 10:00:02 +0100

If you want to include the models beside one another in the same table
you have to save the models (using -eststo- or official -estimates
store-) and then tabulate them in one call, i.e. 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
. eststo q2:  ivreg2 lw s expr tenure rns smsa  age mrt (iq=med kww), robust
. estout q1 q2, cells(b(star fmt(3)) se(par) ) stats(r2_a N widstat jp, fmt(3))

I don't have -ivtest- so I cannot say much about it. I assume -ivtest-
returns some results in r(). The approach then is to grab these result
and add them to the stored estimated using -estadd-, so they can be
tabulated. How exactly you would do this depends on how -ivtest-
returns its results and how you want your table to look like.

ben

On Tue, Feb 10, 2009 at 12:25 AM, Nirina F <[email protected]> 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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index