Statalist


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

st: RE: changing a table format


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: changing a table format
Date   Mon, 9 Nov 2009 17:41:45 -0000

Check out -contract-. 

Nick 
n.j.cox@durham.ac.uk 

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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index