Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

Antwort: RE: Antwort: RE: Antwort: st: -esttab- label and -estpost- Spearman


From   Richard Ochmann <rochmann@diw.de>
To   statalist@hsphsun2.harvard.edu
Subject   Antwort: RE: Antwort: RE: Antwort: st: -esttab- label and -estpost- Spearman
Date   Tue, 19 Oct 2010 10:23:27 +0200

...
> Thank you, Rich.  For some reason, the stat won't show up, although 
> the title shows up.

Amy,
this is because you specified a statistic in the -stat()- option of 
-estout- (ssc des estout) that is not saved under that name as an 
e()-scalar and gave it a label. that will just return the label.
in the -stat()- option of -estout-, you can only specify statistics that 
are saved as e()-scalars and need to call them as they are named in 
-ereturn list-, see -help estout-. for the adjusted R2, this means:

***
sysuse auto
reg price rep78 weight foreign
esttab, label stat(N r2_a, labels("N" "adj.R-squared")) se
***

you may have been irritated here by the fact that you could alternatively 
add the adjusted R2 to the table footer by specifying the option -ar2-, 
which belongs to -esttab- however and which will probably not let you 
specify the labels the way you want to specify them.

hope this finally does the job.
best, rich


owner-statalist@hsphsun2.harvard.edu schrieb am 18.10.2010 20:19:43:

> Thank you, Rich.  For some reason, the stat won't show up, although 
> the title shows up.  The code below creates the table with and 
> without your suggested code.  I am not sure what I am doing wrong.
> 
> ************example***************
> webuse income, clear
> 
> eststo clear
> eststo Male: quietly reg inc edu exp if male
> eststo Female: quietly reg inc edu exp if !male
> 
> esttab using "table1.rtf", replace se ar2 unstack nogaps compress 
> nonumbers ///
>   label title({\b Table 1} {\i Male/Female Income Regressions}) ///
>   stat(N ar2, labels("N" "adj R2")) ///
>   mtitles (Male Female)
> 
> esttab using "table1.rtf", append se ar2 unstack nogaps compress 
nonumbers ///
>   label title({\b Table 1} {\i Male/Female Income Regressions}) ///
>   mtitles (Male Female)
> 
> Amy 
> 
> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-
> statalist@hsphsun2.harvard.edu] On Behalf Of Richard Ochmann
> Sent: Monday, October 18, 2010 11:34 AM
> To: statalist@hsphsun2.harvard.edu
> Subject: Antwort: RE: Antwort: st: -esttab- label and -estpost- Spearman
> 
> ...
> note that you can specify multiple statistics and their labels:
> 
> ***
> sysuse auto
> reg price rep78 weight foreign
> esttab, label stat(N r2, labels("N" "R-squared")) se
> ***
> 
> best, rich
> 
> owner-statalist@hsphsun2.harvard.edu schrieb am 18.10.2010 16:44:43:
> 
> > Thank you, Rich.  That works to keep N, but the problem is that I lose 

> > my ar2 (but not my se).  The solution for me is to just replace 
> > "observations" with "N "in the table when I am editing the paper.
> > 
> > This is the code that I tried.
> > 
> > esttab using "table5.rtf",append se ar2 unstack nogaps compress
> nonumbers ///
> >   stat(N, labels("N"))  label title({\b Table 5} {\i Industry Median 
> > Regressions (cont'd)}) ///
> >   varwidth(12) modelwidth(7)
> > 
> > 
> > -----Original Message-----
> > From: owner-statalist@hsphsun2.harvard.edu [mailto:owner- 
> > statalist@hsphsun2.harvard.edu] On Behalf Of Richard Ochmann
> > Sent: Monday, October 18, 2010 3:46 AM
> > To: statalist@hsphsun2.harvard.edu
> > Subject: Antwort: st: -esttab- label and -estpost- Spearman
> > 
> > ...
> > regarding your first point, you can do this:
> > 
> > ***
> > sysuse auto
> > reg price rep78 weight foreign
> > esttab, label stat(N, labels("N"))
> > ***
> > 
> > best, rich
> > 
> > owner-statalist@hsphsun2.harvard.edu schrieb am 15.10.2010 22:37:30:
> > 
> > > I have 2 questions about -esttab- and 1 question about -estpost-. 
> > > 
> > > 1. When I use the following code: 
> > > 
> > > esttab using "table5.rtf",replace se ar2 unstack nogaps compress 
> > > nonum
> > label
> > > 
> > > N changes from N to Observations.  The documentation for esttab 
> > > states, "  label specifies that variable labels be used instead of 
> > > variable names....  Furthermore, label prints "Constant" instead of 
> > > "_cons".  Does it also change N to observations?  If so, what can I 
> > > do
> 
> > > to keep N?
> > > 
> > > 2.  I  used the following code to create a correlation table, but 
> > > the table is too wide for the page.  Is there an option for changing 

> > > from portrait to landscape?  My temporary solution was to label the 
> > > variables with short names, but eventually I would like more 
> > > descriptive names.
> > > 
> > > estpost correlate adjGAAP_ETR_t adjCURR_ETR_t adjCASH_ETR_t 
> > > adjLR_CASH_ETR_t adjTotalBTD  adjDTAX adjAbnBTD adjSHELTER, matrix 
> > > esttab . using "table3.rtf", append notype unstack compress noobs 
> > > nogaps nostar ///
> > >      title({\b Table 3, Panel B:} {\i Industry-Adjusted 
> > > Correlations})
> > ///
> > >     label varwidth(6) modelwidth(7)
> > > 
> > > 3. Is there a way to estimate Spearman correlations using -estpost-?
> > > 
> > > Thank you for considering my questions.
> > > 
> > > Amy
> > > 
> > > Amy Dunbar
> > > University of Connecticut
> > > School of Business
> > > Department of Accounting
> > > 2100 Hillside Road Unit 1041
> > > Storrs, CT 06269-1041
> > > 
> > > cell 860-208-2737
> > > amy.dunbar@business.uconn.edu
> > > 
> > > 
> > > 
> > > 
> > > *
> > > *   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/
> 
> *
> *   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index