clear
input ///
str10 id str24 year
000001 2004-12-31
000001 2005-12-31
000001 2006-12-31
000001 2007-12-31
000001 2008-12-31
000001 2009-12-31
end
des
encode year,gen(t)
label drop _all
list
不知道你encode命令是怎么写的
你看看用encode到底生产的数据是什么?
. clear
. input ///
> str10 id str24 year
id year
1. 000001 2004-12-31
2. 000001 2005-12-31
3. 000001 2006-12-31
4. 000001 2007-12-31
5. 000001 2008-12-31
6. 000001 2009-12-31
7. end
. des
Contains data
obs: 6
vars: 2
size: 204
--------------------------------------------------------------------------------------------------------------
storage display value
variable name type format label variable label
--------------------------------------------------------------------------------------------------------------
id str10 %10s
year str24 %24s
--------------------------------------------------------------------------------------------------------------
Sorted by:
Note: dataset has changed since last saved