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: Working with aggregated data / exporting results to excel


From   Nick Cox <[email protected]>
To   [email protected]
Subject   Re: st: Working with aggregated data / exporting results to excel
Date   Tue, 14 Feb 2012 22:16:51 +0000

By "excel" I guess you mean the proprietary software MS Excel.

By "tabout" I presume you mean -tabout- (SSC).

If you look at -collapse- you can produce a reduced dataset containing
sums which you can then export in a variety of forms. The calculation
of percentages can clearly be done beforehand.

Nick

On Tue, Feb 14, 2012 at 7:47 PM, Puddicombe, David
<[email protected]> wrote:

> I am working with a dataset that has summary statistics for health facilities.  Each facility is within a health authority.  I would like to produce and export summary statistics to excel.
>
> For example, the tabout command below creates a table that I would like to export to excel which has the number of staff immunized, the total number of staff, and I would like to add the percentage immunized as a column (but could do this in excel if necessary).
>
> tabstat hcwai hcwa, by(ha) stat(sum) format(%9.0f)
>
> Summary statistics: sum
>  by categories of: ha (Health Authority)
>
>    ha |   hcwaimm      hcwa
> -------+--------------------
>   IHA |      4490     10132
>   FHA |      5173     16984
>  VCHA |      5644     12173
>  VIHA |      3941     10021
>   NHA |      1832      4396
>  PHSA |      2015      4389
> -------+--------------------
>  Total |     23095     58095
> ----------------------------
>
> ha = health authority
> hcwaimm = immunized
> hcwa = total health care workers
>

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index