- * Example generated by -dataex-. To install: ssc install dataex
- clear
- input long id int(year year1)
- 5 1993 1990
- 5 1994 1990
- 5 1995 1990
- 5 1996 1990
- 5 1997 1990
- 5 1998 1990
- 5 1999 1990
- 5 2000 1990
- 5 2001 1990
- 5 2002 1990
- 5 2003 1990
- 5 2004 1990
- 5 2005 1990
- 5 2006 1990
- 5 2007 1990
- 5 2008 1990
- 5 2009 1990
- 5 2010 1990
- 5 2011 1990
- 5 2012 1990
- 5 2013 1990
- 5 2014 1990
- 5 2015 1990
- 5 2016 1990
- 5 2017 1990
- end
如题,如何根据year1列的时间设置year,并对year充填?
举例:id 为5的year原始数据是从1993开始,但是year1的值是1990。希望能根据year1的数调整year的起始值,使得id为5的样本,Year列的起始值是1990,并往后填充,1991、1992、1993、1994、1995……2017?
stata 要如何操作呢?


雷达卡



京公网安备 11010802022788号







