Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

st: Table command

From   Ching Wong <>
Subject   st: Table command
Date   Fri, 5 Apr 2013 13:56:52 +1030


I tried to find out the number of observations, mean and sd age of
subjects by gender for the data listed below as an example (by using
the table command):

id | age | gender

1 35 Female
2 27 Female
3 29 Male
4 29 Male
5 30 Female
6 28 Male
7 32 Female
8 32 Female

I put "table age, by(gender) c(n mean sd) " into stata, however, I
have got an error message saying can't find the c or can't find sd.
Why does it happen? Did I use the wrong format of the command? Also,
what is the correct way to make a two-way table with the row of Female
and Male and the column with the obs, mean and sd?

I am actually a bit confused about the command of "table, summarize
and tabstat". It seems they are the same.

Thank you for your time.

Best regards,
*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index