Statalist


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

AW: st: Can I produce a regression output with -outreg2- after -xtoverid2, noisily- ? and temporary names query.


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   AW: st: Can I produce a regression output with -outreg2- after -xtoverid2, noisily- ? and temporary names query.
Date   Thu, 29 Oct 2009 09:22:33 +0100

<> 



Austin`s code does run for me, and does deliver the desired result. To
appreciate the difference, you have to make -esttab- display the standard
errors as - esttab re, scal(estat estatp j jp) se(%10.9fc)-. 

Note it is necessary to reload the -xtoverid2- command from Austin`s site,
as the latest version dated yesterday now returns r-class results that
should enable Kelvin to capture his desired results...



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Kelvin Tan
Gesendet: Mittwoch, 28. Oktober 2009 23:51
An: [email protected]
Betreff: RE: st: Can I produce a regression output with -outreg2- after
-xtoverid2, noisily- ? and temporary names query.

Thanks Austin for the codes, 

I tried to run the following codes, but I got an error message when I ran
the third last line -x2-. Please see the error message. 

. x2
conformability error
r(503);

. est sto re
. esttab re, scal(estat estatp j jp)

----------------------------
                      (1)   
                       ys   
----------------------------
k                 0.00562   
                   (0.73)   

cap              -0.00124   
                  (-0.87)   

_cons               4.644***
                 (621.14)   
----------------------------
N                    1031   
estat                       
estatp                      
j                           
jp                          
----------------------------
t statistics in parentheses
* p<0.05, ** p<0.01, *** p<0.001




The clustered standard errors that I want to capture are from -xtoverid2,
noisily cl(id)-.

I want 
----------------------------
k                 0.00562   
                   (0.011)   

cap              -0.00124   
                  (-0.002)   

_cons               4.644***
                 (0.010)   
----------------------------
----------------------------------------------------------------------------
--
             |               Robust
    __00000O |      Coef.   Std. Err.      z    P>|z|     [95% Conf.
Interval]
-------------+--------------------------------------------------------------
--
    __00000Q |   .0056218   .0106049     0.53   0.596    -.0151635
.026407
    __00000Z |  -.0012407   .0018955    -0.65   0.513    -.0049558
.0024745
    __00000M |   4.643618   .0095373   486.89   0.000     4.624925
4.662311
----------------------------------------------------------------------------
--


Regards,
Kelvin

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Austin Nichols
Sent: Thursday, 29 October 2009 2:00 AM
To: [email protected]
Subject: Re: st: Can I produce a regression output with -outreg2- after
-xtoverid2, noisily- ? and temporary names query.

net from http://www-personal.umich.edu/~nicholsa/stata
net install xtoverid2, replace
clear all
prog x2, eclass
version 8.2
tempvar es
tempname b1 b V
g byte `es'=e(sample)
mat `b'=r(b)
mat `V'=r(V)
mat `b1'=e(b)
loc cn: colnames `b1'
mat colnames `b'=`cn'
mat colnames `V'=`cn'
mat rownames `V'=`cn'
loc y=e(depvar)
loc N=e(N)
eret post `b' `V', dep(`y') e(`es') obs(`N')
eret local cmd "xtoverid2"
eret scalar estat=r(estat)
eret scalar estatp=r(estatp)
eret scalar j=r(j)
eret scalar jp=r(jp)
end
webuse abdata
qui xtivreg ys cap (k=emp wage), re
xtoverid2, cl(id) noi
x2
est sto re
esttab re, scal(estat estatp j jp)


On Wed, Oct 28, 2009 at 10:38 AM, Martin Weiss <[email protected]> wrote:
>
> <>
>
>
>
> You will probably have to dig into the code of -xtoverid2- to capture the
> results returned by -ivreg2-. The -xtoverid- commands subject the initial
> estimations to transformations, as in line 454, hence the tempvars...
>
>
>
> HTH
> Martin
>
> Von: [email protected]
> [mailto:[email protected]] Im Auftrag von Kelvin Tan
> Gesendet: Mittwoch, 28. Oktober 2009 14:57
> An: [email protected]
> Betreff: RE: st: Can I produce a regression output with -outreg2- after
> -xtoverid2, noisily- ? and temporary names query.
>
> Thanks Martin and Austin,
>
> -xtivreg, re- produces non-robust standard errors while -xtoverid, noisily
> cl(id)- produces clustered standard errors. I want to capture the
clustered
> standard errors from -xtoverid, noisily cl(id)- not non-robust standard
> errors from -xtivreg,re-.
>
> Martin said:
> -xtoverid2-, a modification of -xtoverid- by Austin, gets the internal
> results it displays with the unintelligble names of tempvars from
-ivreg2-,
> as far as I can tell from my log file.  So there could be a case for a
> -saveinternal- option along the lines of the -savefirst- option for
> -ivreg2-...
> Does anyone have any examples that I can change unintelligable names of
> tempvars from -xtivreg, re- to my label names?
>
> Regards,
> Kelvin
> ________________________________________
> From: [email protected] on behalf of Martin Weiss
> Sent: Wed 28/10/2009 11:06 PM
> To: [email protected]
> Subject: AW: st: Can I produce a regression output with -outreg2- after
> -xtoverid2, noisily- ? and temporary names query.
>
> <>
>
>
> But I think Kelvin wanted to capture the standard errors displayed by the
> -noisily- option to -xtoverid2-, and they do differ from the ones returned
> by -xtivreg-...
>
>
>
> HTH
> Martin
>
>
> -----Ursprüngliche Nachricht-----
> Von: [email protected]
> [mailto:[email protected]] Im Auftrag von Austin
Nichols
> Gesendet: Mittwoch, 28. Oktober 2009 14:00
> An: [email protected]
> Betreff: Re: st: Can I produce a regression output with -outreg2- after
> -xtoverid2, noisily- ? and temporary names query.
>
> Kelvin Tan <[email protected]> :
> Note that -xtoverid2- is merely replaying results you already have
> when you specify the -noisily- option.  You can add the statistics
> produced by -xtoverid2- like so:
>
> webuse abdata, clear
> xtivreg ys cap (k=emp  wage), re
> est sto re
> xtoverid2, cl(id)
> estadd scalar estat=r(estat)
> estadd scalar estatp=r(estatp)
> estadd scalar j=r(j)
> estadd scalar jp=r(jp)
> esttab re, scal(estat estatp j jp)
>
> if you have -estout- and the other packages installed.
> Probably a similar approach works with -outreg2-.
>
> On Wed, Oct 28, 2009 at 4:28 AM, Kelvin Tan <[email protected]>
> wrote:
>> Dear All,
>>
>> I would like to know if I can produce a regression output with -outreg2-
>> in LaTeX after-xtoverid2, noisily cl(id)- command. When I ran the
>> following commands, I only managed to get the "Results 1" from -
>> xtivreg, re -  but not "Result 2" from -xtoverid, noisily cl(id)-. I
>> would also like to know if there is a command that I can use to change
>> the temporary names to my variable label names after xtoverid. Thanks in
>> advance.
>>
>> Commands:
>> net install xtoverid2,
>> from(http://www-personal.umich.edu/~nicholsa/stata)
>> webuse abdata, clear
>> xtivreg ys (k =  emp  wage  cap), re
>> xtoverid2, noisily cl(id)
>>
>> outreg2 using myfile, tex bdec(3) tdec(2) alpha(0.001, 0.01, 0.05) label
>> ctitle(test)  adds("Endogeneity Pvalue", `r(estatp)', "FE vs RE",
>> `r(j)',"FE vs RE pvalue", `r(jp)' )

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


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