我用:
gen yq = yq(year,quarter)
format yq %tq
xtset stkcd yq
gen asset_5=L5.asset
生成的都是空值。
想请教一下应该如何写命令?
非常感谢!
- * Example generated by -dataex-. To install: ssc install dataex
- clear
- input long stkcd str10 accper double asset float(ymd year month)
- 1 "2001/12/31" 1.20127e+11 15340 2001 12
- 1 "2002/12/31" 1.66166e+11 15705 2002 12
- 1 "2003/12/31" 1.92851e+11 16070 2003 12
- 1 "2004/12/31" 2.04286e+11 16436 2004 12
- 1 "2005/12/31" 2.29216e+11 16801 2005 12
- 1 "2006/12/31" 2.60576e+11 17166 2006 12
- 1 "2007/12/31" 3.52539e+11 17531 2007 12
- 1 "2008/12/31" 4.7444e+11 17897 2008 12
- 1 "2009/12/31" 5.87811e+11 18262 2009 12
- 1 "2010/12/31" 7.27207e+11 18627 2010 12
- end