• 滞后一期

gen x=l.x

  • smallpdf可以在线免费将可编辑的pdf转成Word
  • 查找不到excel里面的值,格式也统一的

解决方案:空格替换

请检查数据前后是否存在无意义的空格,这将导致有空格和无空格的相同数据无法匹配。
如“ 运营一部 ”和“运营一部”代表不同的数据。
处理方式:查找和替换:
查找:(输入一个空格)
替换:(什么也不输入)
全部替换。

 

--恢复内容开始---

excel金融计算器   :PMT PV FV

---恢复内容结束---

 

  •  字符串转化成数值型:destring date, replace ignore(" ")     ##中间是空格或者-或者,
  • 根据已有字符串名称生成id:egen id=group(国家)  ##注意英文输入括号
  • 生成对数  gen lnX5=log(x5)
  • 生成滞后一期 gen x=L.(x)
  • 面板数据声明: xtset id year
  • 统计描述su 后面不加变量就全部都描述
  • OLS回归:reg y x
  • 面板数据行列变换:reshapestata几个常用命令

 

. gen id=( 国家Name)+(系列Name) ##variable id does not uniquely identify the observations

  • . reshape long YR, i(id) j(year)

 

  •  洛伦兹曲线:glcurve
  • 生成正态分布随机数:
  • . set obs 200

number of observations (_N) was 10, now 200

. gen x=rnormal(812,100)

  • 输出stata的结果

输完命令后,在结果窗口将结果全选。
Edit--Copy table

或者logout,save(ms) excel replace:sum

 

相关文章:

  • 2022-02-08
  • 2021-11-24
  • 2021-11-15
  • 2021-06-01
  • 2021-05-24
  • 2021-12-06
猜你喜欢
  • 2021-09-19
  • 2022-12-23
  • 2022-12-23
  • 2021-05-17
  • 2021-09-29
  • 2021-07-13
  • 2021-10-24
相关资源
相似解决方案