没有这5个Stata命令, 我真的会活不下去!
凡是搞计量经济的,都关注这个号了
稿件:econometrics666@126.com
关于Stata相关技能,各位学者可以参阅如下文章:1.Stata16新增功能有哪些? 满满干货拿走不谢,2.Stata资料全分享,快点收藏学习,3.Stata统计功能、数据作图、学习资源等,4.Stata学习的书籍和材料大放送, 以火力全开的势头,5.史上最全Stata绘图技巧, 女生的最爱,6.把Stata结果输出到word, excel的干货方案,7.编程语言中的函数什么鬼?Stata所有函数在此集结,8.世界范围内使用最多的500个Stata程序,9.6张图掌握Stata软件的方方面面, 还有谁, 还有谁?,10.LR检验、Wald检验、LM检验什么鬼?怎么在Stata实现,11.Stata15版新功能,你竟然没有想到,一睹为快,12."高级计量经济学及Stata应用"和"Stata十八讲"配套数据,13.数据管理的Stata程序功夫秘籍,14.非线性面板模型中内生性解决方案以及Stata命令,15.把动态面板命令讲清楚了,对Stata的ado详尽解释,16.半参数估计思想和Stata操作示例,17.Stata最有用的points都在这里,无可替代的材料,18.PSM倾向匹配Stata操作详细步骤和代码,干货十足,19.随机前沿分析和包络数据分析 SFA,DEA 及Stata操作,20.福利大放送, Stata编程技巧和使用Tips大集成,21.使用Stata进行随机前沿分析的经典操作指南,22.Stata, 不可能后悔的10篇文章, 编程code和注解,23.用Stata学习Econometrics的小tips, 第二发礼炮,24.用Stata学习Econometrics的小tips, 第一发礼炮,25.广义合成控制法gsynth, Stata运行程序release,26.多重中介效应的估计与检验, Stata MP15可下载,27.输出变量的描述性统计的方案,28.2SLS第一阶段输出, 截面或面板数据及统计值都行,29.盈余管理指标的构建及其Stata实现程序, 对应解读和经典文献,30.Python, Stata, R软件史上最全快捷键合辑!,31.用Stata做面板数据分析, 操作代码应有尽有,32.用Stata做面板数据分析, 操作代码应有尽有。还有很多相关文章,各位学者可以自行搜索参阅。
help
help
help logit
help ivreg2
outreg2 / esttab
import delimited
collapse
egen
merge
tabulate
collapse
estout
strpos
program
gr_edit
help
help
help
help
help
set more off
use
destring
egen
tab and sum
𝚊𝚜𝚜𝚎𝚛𝚝
𝚖𝚕𝚊𝚋
recast strL
missing
help fvvarlist
clonevar
motivate
motivate
motivate
motivate
motivate
tex/webdoc (sometimes markstat instead)
coefplot
heatplot (I need to break my Ben Jann theme)
tabout2
svy: commands
Also , cond(),
_n subscripting,
mod(), and all the extended_fcn macros!
Esttab
Forval /foreach
Append
Merge
reg
mata
margins
glm
twoway
contract
lookfor
char
isid
browse
a few others
set scheme X, where X is anything but the default baby blue border abomination.
regular expressions
ftools
gtools
reghdfe
shell python
shell matlab
shell R
shell cp
shell
cls
local
global
///
rename _all, lower
findit
egen flag = tag(group)
Foreach/forval
Egen
If/else
Merge/append
Reshape
reshape
gen
bys
egen
merge
egen
reshape
replace
twoway
merge
display
texdoc
foreach/forvalues
local
twoway
egen
egen
egen
egen
egen
inlist
reshape
help reshape
foreach
help foreach
by/bysort: great for lag/lead type calculates or panel data in general.
byhist makes nice categorical histograms in a single panel.
Putexcel is great for making custom reproducible tables in excel (plus excel to latex extension for latex).
labmask is great for replacing strings with labeled intergers for i. or reducing file sizes.
levelsof is great more making lists of values of string variables.
"set trace on"(When combined with the classic green font, black background, it makes everything look like The Matrix. Fine, I guess it also helps with debugging code by showing exactly where things go wrong)
Robust SEs
collapse
egen
append
margins
reshape
help
foreach
post
margins
twoway
reshape wide
reshape long
reshape wide
reshape long
reshape wide
margins
merge
collapse
glm
estout
help
tw
eststo/esttab
glm
lookfor
cluster
qui
margins
forval/foreach
fasterxtile
stset
estout/outreg2
br
egen
tabstat
merge
foreach/forval
Gen
Egen
Browse
Tabulate
Merge
fre
sum, detail
twoway
merge
date
egen
Foreach/forval
svyset
Reg
tab & br
Egen
set scheme
estout / putexcel
tokenize
tempfile
grc1leg
mvdecode
coefplot
predict
xtline
mdesc
margins
local
pause (if you teach)
recode
foreach
Gen/replace
Recode
Over / by
If
m
reshape
merge
append
bysort
replace
estout
outreg2
xtnbreg
codebook
merge
svyset, svydes, svy: ...
foreach, forvalues, while
capture
preserve(, restore)
mat def & nullmat()
egen
merge
reshape
substr
All of the date commands
catplot
vplot
compress
codebook
Anything by N Cox
char
extended_fcn
meglm
twoway
program
reshape
foreach/forval
collapse
local/global
tempfile/tempvar
reghdfe
gcollapse
greshape
help
ta
svyset
predict
scatter
collapse
outreg
stcox
egen
merge
foreach
label define/values
Foreach -for loops
tab - bivariates matter!
margins and marginsplot -visualizing interactions
Factor notation: i.[varname] -dummy coding is a breeze
set more off - every single file starts with it.
contract
egen (rowfirst) - to coalesce across rows
levelsof - to iterate across values
tuples - all combinations of a list
preserve - goes well with collapse
tab,sort - to list variables by frequency
collapse
ivreg2
twoway
xtabond2
reshape
I use egen and frame all the time.
I use forval (with local) to turn 50 lines of code into three lines.
And I use esttab and Latab for anything LaTeX related.
codebook
hist
regress
metan
clear
renvars (renaming variables)
mdesc (assess missingness)
distinct (# of unique cases)
strmatch (string function)
inlist (tag values within a variable)
numlabel, add
Collapse
Levelsof var, local(varval)
Tab var, g(vardum)
Pause on
And of course.... Reshape.
Fre
Margins
Coefplot
Khb
Svy
list
label
tab1
bysort
test
svy set
mi
foreach
margins
teffects
cmp
shell
collapse
shell Rscript [scriptName.r]
kdensity & akdensity
cmp
coefplot
esttab
rifreg (& now generalised to rifhdreg
Source: https://dwz.cn/Fu3gApMa
期待大家说出5个必不可少的Stata命令
拓展性阅读:
2.5年,计量经济圈近1000篇不重类计量文章,
可直接在公众号菜单栏搜索任何计量相关问题,
Econometrics Circle
数据系列:空间矩阵 | 工企数据 | PM2.5 | 市场化指数 | CO2数据 | 夜间灯光 | 官员方言 | 微观数据 | 内部数据计量系列:匹配方法 | 内生性 | 工具变量 | DID | 面板数据 | 常用TOOL | 中介调节 | 时间序列 | RDD断点 | 合成控制 | 200篇合辑 | 因果识别 | 社会网络 | 空间DID数据处理:Stata | R | Python | 缺失值 | CHIP/ CHNS/CHARLS/CFPS/CGSS等 |干货系列:能源环境 | 效率研究 | 空间计量 | 国际经贸 | 计量软件 | 商科研究 | 机器学习 | SSCI | CSSCI | SSCI查询 | 名家经验计量经济圈组织了一个计量社群,有如下特征:热情互助最多、前沿趋势最多、社科资料最多、社科数据最多、科研牛人最多、海外名校最多。因此,建议积极进取和有强烈研习激情的中青年学者到社群交流探讨,始终坚信优秀是通过感染优秀而互相成就彼此的。