全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件
1250 0
2019-12-12
首先安装
ssc install todate
如何网络下载包有卡,则下载以下包,手动安装之。
net install todate, replace from(c:\todate)
todate.rar
大小:(5.92 KB)

只需: 3 个论坛币  马上下载


如果出现:
c:\git\todate\ either
  1)  does not exist or
  2)  is not a Stata download directory (has no stata.toc file).
current site is still http://fmwww.bc.edu/RePEc/bocode/t/则下载第二个含stata.toc的包
2todate.rar
大小:(11.38 KB)

只需: 2 个论坛币  马上下载


解压后安装:
net install todate, replace from(c:\todate)
然后:
clear
cd D:\....\uscar232
insheet using 1996201909calculateddutiesusimportcars.csv,names case clear
rename (Jan        Feb        Mar        Apr        May        Jun        Jul        Aug        Sep        Oct        Nov        Dec)  ///
(v1 v2 v3 v4 v5 v6 v7 v8 v9 v10 v11 v12)
reshape long v, i(year CID) j(month)
//save import, replace
rename v carduties
label variable carduties "duties of autoes and parts"
egen date=concat(month year),decode
destring date,replace
format date %07.0f

todate date, gen(datevar) pattern(mmyyyy)
drop date
rename month months
rename datevar month
encode Country,g(nation)
save "D:\.....\uscar232\1996201909monthsusimcarsduties.dta"



二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群