Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: mode

From   "Nick Cox" <>
To   <>
Subject   st: RE: mode
Date   Thu, 8 Apr 2004 09:25:54 +0100

This isn't a simple question at all. If your 
variable is discrete, two or more values may tie
for mode. If your variable is continuous, how
to define the mode is an open issue. Nevertheless, 
-search mode- points to an -egen- function =mode()- 
and a user-written command -modes-. From your question
the first may be closer to what you want. 

The Statalist FAQ contains advice on using -search- 
and other facilities. 


peter harper

> I wondered
> if anyone can tell me how do I obtain 'mode'(of
> course, it is term like mean, median etc.) of a
> variable for individual years. I have a dataset for 21
> years.

*   For searches and help try:

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