Statalist


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

st: RE: how to get the "tabdis" result in datasheet?


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: how to get the "tabdis" result in datasheet?
Date   Wed, 20 May 2009 18:34:18 +0100

Not clear what your question is here, but check out -reshape-. 

You have what -reshape- calls a long structure. The table is in essence
a wide one. But mostly in Stata you are better off with long, namely
what you have already. 

I never knew this before, but it seems you can abbreviate -tabdisp- to
-tabd- or -tabdi- or -tabdis-. 

Nick 
[email protected] 

ZoeW

I have the following data:

tract,sector,counts
1,     9,      15
2,     3,      20
3,     2,     5
3,     3,     10
3,     5,      35

I have 300 tracts, 9 sectors (1-9) and counts shows 
how many of each sector in each tract. 

I want to make them into the followign format:

tract,  sector1, 2, sector3, sec4, sec5,  ,,,, sec9
1                                               15(counts)
2                      20
3         5            10            35 

I used 
>tabdis tract sector, cell(counts)
It gives the table like the above one, then I copy the table into excel 

Any shortcut way to produce the tablelike the above one into the
datasheet?

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