楼主: adxt123
1915 1

[数据管理求助] 把EXCEL的子表录入STATA 并且将行列进行计算 [推广有奖]

  • 1关注
  • 1粉丝

本科生

50%

还不是VIP/贵宾

-

威望
0
论坛币
1803 个
通用积分
25.5091
学术水平
2 点
热心指数
12 点
信用等级
0 点
经验
987 点
帖子
57
精华
0
在线时间
92 小时
注册时间
2013-10-1
最后登录
2017-4-29

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
关键词:EXCEL Stata xcel tata exce EXCEL 如何
沙发
ermutuxia 发表于 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

使用道具

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-4-28 22:52