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

st: RE: multiple sample split (year-by-year)

From   "Nick Cox" <>
To   <>
Subject   st: RE: multiple sample split (year-by-year)
Date   Tue, 13 Nov 2007 15:43:29 -0000

You can use -egen, median()- to get the medians. The second 
problem can be answered in different ways, but you could 
just follow a -sort- with an appropriate -generate-.

My database: panel data (unbalanced), 1200 firms, 8 variables. 
First, I need to calculate the median value of a given variable (es.
var1), year-by-year. Then, I would divide firms evenly into three groups
according to their value in each year, I mean firms residing in the
low-, middle- and high- var1 group. Could anybody tell me the commands I
need to use? Thank you very much in advance for any illustrative

*   For searches and help try:

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