Statalist


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

Re: st: adding variable labels using outreg2


From   Roy Wada <[email protected]>
To   <[email protected]>
Subject   Re: st: adding variable labels using outreg2
Date   Tue, 19 Feb 2008 15:05:10 -0800

You probably did not include label option in the second instance of outreg2. 
It's the last one that counts. The following codes will first add and then strip 
labels. The last line is telling it to make it go away.

sysuse auto, clear
reg mpg wei length
outreg2 using temp, see label
outreg2 using temp, see

The reverse is also true. Labels can be added very last.

outreg2 using temp, see
outreg2 using temp, see label

The ability to add/erase labels at anytime is not mentioned by the help file. 

Roy


> Hi Maarten,
>
> Thanks for your response! My version was 1.3. However, after I updated
> to version 1.4 and wrote the code as you did, the problem is not
> solved. I have several columns in the output table, each corresponds
> to one specification. That is, I am attaching results of several
> specifications into one table.
>
> After the first specification, I can see the labels from the popup
> window and four new variables where v1 corresponds to the variable
> names, v2 the variable labels, v3 the regression results, and the last
> column for table title and notes.
> After the second specification, v2 is replaced by the results of the
> first specification, and v3 is replaced by the results of the second
> specification. The resulting output table contains only variable
> names. Could you please give me more tips?
>
> Lili
>
>>> I want to add variable labels in outreg2 so that the output table
>>> lists variable labels instead of their names. This is my code:
>>>
>>> outreg2 using age.doc, bdec(4) label rdec(4) title("...")
>>> ctitle(...) replace
>>>
>>> However, the output table contains only variable names. Could anyone
>>> please tell me how I should write the code? Thanks!
>>
>> This works for me:
>>
>> *--------------- begin example ----------------
>> sysuse auto, clear
>> reg mpg wei length
>> outreg2 using temp.doc, word seeout label
>> *--------------- end example ------------------
>>
>> If you type -which outreg2- you get the version number. I got version
>> 1.4 of outreg2. Maybe you got an old version.
>>
>> Hope this helps,
>> Maarten


_________________________________________________________________
Shed those extra pounds with MSN and The Biggest Loser!
http://biggestloser.msn.com/
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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