Statalist The Stata Listserver


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

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


From   "Mehmet Eris" <mneris@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: RE: Table with medians of a variable with many categorical variables
Date   Thu, 15 Mar 2007 20:30:09 +0200

Thanks a lot and sorry. I didn't mean to offend anybody.

On 3/15/07, Nick Cox <n.j.cox@durham.ac.uk> wrote:
Never say "I have a quick question".

1. If the question's quick, the answer may not be!

2. If you think your question is trivial, then don't ask
it. If you think your question is interesting, it needs no
apology.

That said, -findit tabout-. I think -tabout- can do this.

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

Mehmet Eris

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

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

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