Statalist


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

st: RE: RE: RE: changing a table format


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: RE: changing a table format
Date   Mon, 9 Nov 2009 18:04:40 -0000

Martin has carried the problem through to a solution. 

Note also that you could plot the data in exactly the present structure,
e.g. 

catplot hbar sex age desir_age [w=freq]

where -catplot- is from SSC. 

Nick 
[email protected] 

Nick Cox

... followed by -reshape-. 

Nick Cox

Check out -contract-. 

Ekaterina Hertog

I have got a table with 4 variables

sex age desir_age freq
female 22 25 16
male 23 20 27
female 23 20 23
male 23 21 2
female 23 21 4
male 23 22 5
and I would like to turn "sex" and "freq" variables into "frequency 
male" and "frequency female" to be able to make a graph.

So the resulting table should look something like that
age desir_age freq_m freq_f
22 25 - 16
23 20 27 23
23 21 2 4
23 22 5 -
I have looked at the -table- command but I cannot quite figure out how 
to do it.


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