绘制上图的Stata代码如下: ** Master file for results replication. ** Please note that tables will be produced in "raw" form and require manual recombination and/or formatting to match the finished tables. * Load adofiles * These files are created by the authors for the purpose...
阅读全文
绘制上图的Stata代码如下: * Maps displaying levels of a variable * ------------------------------------------------------------------------------ * Packages * ------------------------------------------------------------------------------ ssc install spmap ssc install shp2dta *...
阅读全文
绘制上图的Stata代码如下: * FIGURE: Line graph with uncluttered scheme * Load built-in data sysuse uslifeexp * Change scheme: scheme needs to be manually installed. Instruction on how * to this can be found in https://gray.kimbrough.info/uncluttered-stata-graphs/ set scheme un...
阅读全文
绘制上图的Stata代码如下: * FIGURE: Line graph with plottig scheme * Install user-written graph scheme ssc install blindschemes, replace * Select graph scheme (similar to R's ggplot2) set scheme plottig * Load built-in data sysuse sp500, clear * Create graph: show time series ...
阅读全文
绘制上图的Stata命令如下: * Install necessary commands ****************************************************************** * Custom commands defined in ado files: * freeshape: reshapes wide data into long without requiring variables names of * the variables to be shaped numbere...
阅读全文
生成上图的Stata命令如下: * Figure: Horizontal bar plot with grouping of variables, standard error bars, and cross-group comparisons * Replication file for: * Satyanarayana S, Kwan A, Daniels B, Subbaraman R, McDowell A, Bergkvist S, Das RK, Das V, Das J, Pai M. * Use of stand...
阅读全文
比如,我们想直观地看孕期吸烟者者和非吸烟者两组新生儿的出生体重是否有差异,可以通过Stata社区命令betterbar实现。 Stata命令如下: /*读取演示数据*/ webuse lbw /*绘制误差条形图,用前需先安装,如ssc install betterbar,详见文末*/ betterbar bwt, over(smoke) ci 上图是最基本的,默认是水...
阅读全文
Stata社区命令托管的地方可以分为4大类:Stata Journal、SSC、GitHub和开发者的个人网站。其中Stata Journal国内访问挺快,SSC和GitHub国内访问非常慢,一般一下载Stata就会处于卡死状态。 一般的经验介绍都是通过修改本机的DNS解析进行加速,但测试下来效果有限。本文介绍通过网易UU加速器(https:...
阅读全文
前几天有位EpiMan的坛友询问上面的图如何在Stata中实现,写一个教程,供参考。 Stata中实现相关矩阵热图的社区命令为corrtable,该命令由英国杜伦大学 (Durham University) 的Nicholas J. Cox教授开发,生成热图时有些慢,需要耐心等待几十秒。 先安装Stata社区命令: * Install corrtable if neces...
阅读全文