STATA
程序员文章站
2022-04-11 15:35:09
...
*others cd "D:\桌面\ use "D:\桌面\1.dta" clear all *dealing with data egen country = group( LOCATION ) encode country, gen ( time) destring country, replace drop frequency rename time country merge m:m year country using "D:\桌面\7.dta",keep(match) nogenerate egen id = group(Year) gen InternetEffectiveness = Internet*Effectiveness gen trade_gdp=trade/gdp duplicates drop Country Year, force tsset Country Year ssc install xtbalance xtbalance,range(2009 2015) ssc install asdoc help ihstrans ssc install ihstrans ssc install xtavplot asdoc sum *regression1 xtset country year xtreg trade_gdp c.internet##c.effectiveness ,fe est store f1 lincom internet + c.internet#c.effectiveness xtreg trade_gdp c.internet##c.effectiveness i.year ,fe est store f2 lincom internet + c.internet#c.effectiveness xtreg trade_gdp c.internet##c.effectiveness i.year population education,fe est store f3 lincom internet + c.internet#c.effectiveness outreg2 [f1 f2 f3] using test1.doc,replace xtavplot c.internet#c.effectiveness test internet c.internet#c.effectiveness hist trade_gdp *regression2 xtreg trade_gdp c.internet##c.stability ,fe est store f4 lincom internet + c.internet#c.stability xtreg trade_gdp c.internet##c.stability i.year ,fe est store f5 lincom internet + c.internet#c.stability xtreg trade_gdp c.internet##c.stability i.year population education,fe est store f6 lincom internet + c.internet#c.stability outreg2 [f4 f5 f6] using test2.doc,replace xtavplot c.internet#c.stability test internet c.internet#c.stability hist trade_gdp *regression3 xtreg trade_gdp c.internet##c.law ,fe est store f7 lincom internet + c.internet#c.law xtreg trade_gdp c.internet##c.law i.year ,fe est store f8 lincom internet + c.internet#c.law xtreg trade_gdp c.internet##c.law i.year population education,fe est store f9 lincom internet + c.internet#c.law outreg2 [f7 f8 f9] using test3.doc,replace xtavplot c.internet#c.law test internet c.internet#c.law hist trade_gdp *robust *gen lntrade_gdp=ln(trade_gdp) will loseing obvs,so ihstrans ihstrans trade_gdp rename ihs_trade_gdp lntrade_gdp *robust regression *regression4 xtset country year xtreg lntrade_gdp c.internet##c.effectiveness ,fe est store f1 lincom internet + c.internet#c.effectiveness xtreg lntrade_gdp c.internet##c.effectiveness i.year ,fe est store f2 lincom internet + c.internet#c.effectiveness xtreg lntrade_gdp c.internet##c.effectiveness i.year population education,fe est store f3 lincom internet + c.internet#c.effectiveness outreg2 [f1 f2 f3] using test4.doc,replace xtavplot c.internet#c.effectiveness test internet c.internet#c.effectiveness hist lntrade_gdp *regression5 xtreg lntrade_gdp c.internet##c.stability ,fe est store f4 lincom internet + c.internet#c.stability xtreg lntrade_gdp c.internet##c.stability i.year ,fe est store f5 lincom internet + c.internet#c.stability xtreg lntrade_gdp c.internet##c.stability i.year population education,fe est store f6 lincom internet + c.internet#c.stability outreg2 [f4 f5 f6] using test5.doc,replace xtavplot c.internet#c.stability test internet c.internet#c.stability hist lntrade_gdp *regression6 xtreg lntrade_gdp c.internet##c.law ,fe est store f7 lincom internet + c.internet#c.law xtreg lntrade_gdp c.internet##c.law i.year ,fe est store f8 lincom internet + c.internet#c.law xtreg lntrade_gdp c.internet##c.law i.year population education,fe est store f9 lincom internet + c.internet#c.law outreg2 [f7 f8 f9] using test6.doc,replace xtavplot c.internet#c.law test internet c.internet#c.law hist lntrade_gdp
上一篇: 抖音自动引流脚本源码
推荐阅读
-
Stata 15怎么安装?Stata 15安装+破解图文详细教程(附破解版下载)
-
Stata中文乱码顽疾解决方法
-
Stata13怎么安装?Stata13.1安装破解详细图文教程
-
Stata 16怎么激活?Stata 16安装教程+永久授权许可步骤(附有效序列号)
-
现在看,在统计学或(理论/应用)计量经济学领域,python 能完美地代替 R 和 stata 吗?
-
现在看,在统计学或(理论/应用)计量经济学领域,python 能完美地代替 R 和 stata 吗?
-
stata的清洗数据——去除重复数据
-
Stata 15怎么安装?Stata 15安装+破解图文详细教程(附破解版下载)
-
Stata13怎么安装?Stata13.1安装破解详细图文教程
-
Stata:市场调整模型(MA)计算的并购事件的累积超额回报(CAR)