Statalist The Stata Listserver


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

Re: st: RE: Display


From   Ronnie Babigumira <rb.glists@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: RE: Display
Date   Mon, 02 Oct 2006 12:15:59 +0200

bull's-eye

Thank you so very much

Ronnie

Nick Cox wrote:
See Tip 36 in the Stata Journal.
SJ-6-3 dm0025 . . . . . . . . . . . . . . Stata tip 36: Which observations?
Q2/06 SJ 6(3):430--432 (no commands)
tip for identifying which observations satisfy some
specified condition

Apologies for the stupid typo therein, identified by Kit Baum within one hour
of on-line publication.
Nick n.j.cox@durham.ac.uk
Ronnie Babigumira

Say I have data like this

hhid salary spending
1 19583 3346
2 20263 3114
3 20325 3554
4 26800 4642
5 29470 4669
...

Where hhid is household id. If I wanted to know the household with the median salary, I could for example

qui sum salary, detail
list hhid if salary == r(p50)

Is it possible to use the above information with -display- (display "The household with median salary is ....") so I can get

The household with the median salary is 5
*
*   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