Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Table with medians of a variable with many categorical variables


From   "Mehmet Eris" <[email protected]>
To   [email protected]
Subject   st: Table with medians of a variable with many categorical variables
Date   Thu, 15 Mar 2007 19:49:30 +0200

I have a quick question about tables in Stata. I want to have table of
medians for one variable, say income,  for a bunch of categorical
variables, say household head's sex, educational level etc.

Table would something like the following:
=========================
                             median of income
========================
Sex:
 Male
 Female

Educational level:
 Secondary
 Vocational

.
.
.
.
====================

table A, c(median X) is sort of what I am looking for. It gives the
median of the variable X for each category in A. But this one
works for only one variable.  I don't want to do it one by one for
each row categorical variable. It will be really tedious as I have to
do it for so many times.

Is there any tricks or commands that I can use to achieve what I want
to do?  I also want to be able to export the table I get to Excel,
BTW.


Thanks so very much in advance!
*
*   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/



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