全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
2095 1
2014-07-19
悬赏 20 个论坛币 已解决
要求,首先每张表格如何录入STATA。(把1995 2000 2005同时插入)
其次,如何将V3行和V4行相加之后,新生成的行替代原行,row即v3+v4=new_v3。之后再将V3和V4列col相加替代原来的列。
PS:如果不是方阵如何计算?

求助各位了。

最佳答案

ermutuxia 查看完整内容

import excel using data.xlsx,firstrow sheet("1995") gen year=1995 save data1995,replace import excel using data.xlsx,firstrow sheet("2000") gen year=2000 save data2000,replace import excel using data.xlsx,firstrow sheet("2005") gen year=2005 save data2005,replace use data1995,clear append using data2000 append using data2005 save data,replace
二维码

扫码加我 拉你入群

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

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

全部回复
2014-7-19 11:05:34
import excel using data.xlsx,firstrow sheet("1995")
gen year=1995
save data1995,replace
import excel using data.xlsx,firstrow sheet("2000")
gen year=2000
save data2000,replace
import excel using data.xlsx,firstrow sheet("2005")
gen year=2005
save data2005,replace
use data1995,clear
append using data2000
append using data2005
save data,replace
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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