Statalist The Stata Listserver


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

Re: st: median


From   Jeph Herrin <[email protected]>
To   [email protected]
Subject   Re: st: median
Date   Fri, 11 Aug 2006 09:44:34 -0400

If there are no duplicate or missing values, then either _N/2 or (_N-1)/2 will
be strictly above the median, depending on whether _N is even or odd,
respectively. If there are duplicate or missing values, then you'll have to
calculate the median to know how many are strictly above it.

I would only ever take the second route; it's not clear why calculating
and using the median would ever be a problem.

hth,
Jeph



Monika Huembelin wrote:
I'd like to calculate how many observations in each cohort are above the total median value of a variable. Does anyone know if there is an easy way to do that without having to calculate the median first and include the value in each following calculation? I couldn't find anything in the help files. Thank you

Monika


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