[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" <>
To   <>
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-. 



I have the following data:

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

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index