Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: Formatting output


From   Anup Nandialath <[email protected]>
To   [email protected]
Subject   Re: st: Formatting output
Date   Thu, 18 Jul 2013 10:09:15 +0400

Thank you so much James!! the tabout package was perfect.

Thanks
Anup

On Thu, Jul 18, 2013 at 9:43 AM, James Beard <[email protected]> wrote:
> Anup -
>
> You can get more or less what you want with...
>     tabstat lta cratio, by(b) stats(mean sd)
>
> Or, with the add-on -tabout- (type -findit tabout- and follow the
> links)...
>     tabout b using x.txt, sum replace ///
>      cells(mean lta mean cratio sd lta sd cratio) sum replace
> There are many many options for -tabout- that will help you get the
> table looking exactly the way you want - the above command just gets
> the right numbers in the rights cells in the right order.
>
> James.
>
> On 18 Jul 2013 at 8:21, Anup Nandialath wrote:
>
>> Dear statalisters,
>>
>> I'm trying to reformat summary output. My problem is as follows
>>
>> I have several groups assigned through the variable b. I need only the
>> mean and SD of each one of these variables. I used the following
>> command and it generates the output needed but I was wondering if I
>> could get the same output in a different form.
>>
>> The output using the summarize command is as follows
>>
>> . bys b: summ lta cratio
>>
>> ---------------------------------------------------------------------------------------------------------------------------------------------
>> -> b = 1
>>
>>     Variable |       Obs        Mean    Std. Dev.       Min        Max
>> -------------+--------------------------------------------------------
>>          lta |      5326    6.050269      1.1378   3.945458    11.1046
>>       cratio |      5326    3.453158    2.902567   .2558635       20.5
>>
>> ---------------------------------------------------------------------------------------------------------------------------------------------
>> etc
>>
>>
>> Preferable output format
>>
>>
>>                     MEAN                      SD
>>                 LTA     CRATIO      LTA     CRATIO
>> B=1           xxx        xxx           xxx        xxx
>> B=2
>> B=3
>> .
>> .
>> .
>> B=N            xxx        xxx           xxx          xxx
>>
>> Any help on whether such reformatting is possible and if yes how it
>> can be achieved is much appreciated.
>>
>> Thanks
>>
>> Anup
>> *
>> *   For searches and help try:
>> *   http://www.stata.com/help.cgi?search
>> *   http://www.stata.com/support/faqs/resources/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/faqs/resources/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/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index