Dear All, the following question is from here (https://bbs.pinggu.org/forum.php?mod...=1#pid57703787). The data set is
For each id, a "big" dummy is defined to be 1 (for all the observations in this id) if the population (pop) is larger than 500 in the year 2016, 0 otherwise. Similarly, a "medium" dummy is defined if 200 < pop < 500, and a "small" dummy is defined as pop < 200. Any suggestions? Thanks.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float(id year pop) 3 2003 200 3 2004 500 3 2005 600 3 2006 700 1 2003 600 1 2004 800 1 2005 900 1 2006 1000 2 2003 600 2 2004 900 2 2005 1200 2 2006 1300 4 2003 400 4 2004 500 4 2005 600 4 2006 700 5 2003 900 5 2004 950 5 2005 1000 5 2006 1100 end
Comment