Sunday, February 26, 2006
Re: st: a question about making a tabel using STATA
On 2/26/06, Jian Zhang <email@example.com> wrote: > Dear STATA users, > > I have a question about making a table using STATA. I couldn't figure out > how to make it. Hope that you could help me. > > The table that I need has the following format: > > group1 group2 group3 > variabel 1 > variabel 2 > variabel 3 > > The celles are filled with variable means for each group and for each > varialbe. For example, the first cell (row 1 and column 1) is the mean of > variable 1 for group 1. > > I know that I can use command table to make the following table: > > table group, by(mean variable1 mean variable2 mean variable3) > > variable1 variable2 variable3 > group1 > group2 > group3 > > > Since I have so many variables and groups, it would take too much time to > convert the format of the secon table to that of the first table > manually. I wonder if there is a shortcut way in which I could directly > generate the first table? > You could transpose your data first using the -xpose- command. See -man xpose- for full details on how to transpose your data.
> A related question is that: is there an option in command table or in > other commands that we could automatically indicate the statistical > signifance of the difference between groups for same variables on the > tables? I looked through the help file for command table and did not find > such options. Do I need to use command ttest for each group and for each > variable and then manually indicate the statistical significance on the table? > No, table does not support such tests, you need to perform the tests manually and then tabulate the results.
Depending on what tests you are performing you may find -parmest- or -estout- useful. To find out more on these commands type...
. ssc describe parmest
or . ssc describe estout
Neil -- "Religion is the work of the Devil" - Anon
Email - firstname.lastname@example.org / email@example.com
Website - http://slack.ser.man.ac.uk/ Blog - http://slack---line.blogspot.com/ Flickr - http://www.flickr.com/photos/slackline/
* * For searches and help try: * http://www.stata.com/support/faqs/res/findit.html * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/
Links to this post: