Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Re: Re: st: pick maximum,minimum, mode and median among scalars
From
Nick Cox <[email protected]>
To
[email protected]
Subject
Re: Re: Re: st: pick maximum,minimum, mode and median among scalars
Date
Thu, 11 Aug 2011 08:41:49 +0100
My main point about the median is not as you summarise here. But in
your particular application, because 81 is odd, the median will be
identifiable as the 41st value when sorted, and a few lines of code
will tell you which value that is.
Nick
On Thu, Aug 11, 2011 at 1:35 AM, Zhi Su <[email protected]> wrote:
> Hi, Nick,
>
> You are right that the definition for indexes of min, max and median
> are unclear when a set of number has repeated (tied) values. In my
> case, the chace to have repreated values in a set of number is very
> slim because this set is coefficients of the same indepdendent
> variable in 81 different regression under different assumption. When
> this set has 81 unique values (hopefully), it should be able to
> identify the median of these 81 values. I want to see what the
> assumption is when the coeficient reaches its min, median and max.
> Thank!
>
> Su
>
> From Nick Cox <[email protected]>
> To [email protected]
> Subject Re: Re: Re: st: pick maximum,minimum, mode and median among scalars
> Date Thu, 11 Aug 2011 00:51:56 +0100
>
> --------------------------------------------------------------------------------
>
> With the most common definition of the median, as you will recall, the
> median is the average of two values whenever the number of values is
> even. Therefore, the median is often itself _not_ one of the data
> values, and so a median index is not always defined. Within continuous
> data not too coarsely recorded, this will, I guess, happen about half
> the time. That is one good reason for the lack of a median index
> function.
>
> By the way, the concept of minimum index or maximum index is also
> problematic whenever there are ties for minimum or maximum.
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/