生成上图的Stata代码如下: * Figure:Side by side horizontal bar plot (Outcomes by City & Case) using weightab global graph_opts /// title(, justification(left) color(black) span pos(11)) /// graphregion(color(white) lc(white) lw(med) la(center)) ///
阅读全文
* 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 standardised patients to assess antibiotic dispensing for tuberculosis by pharmacies in urban India: * A cross-sectional study. * The Lanc...
阅读全文
* Figure: combined bar plots with two axes * Load data * --------- use "http://ds.epiman.cn/uploads/2022/06/bar-two-axes.dta", clear * Adjust variable for bar position gen x = int1mo+.5 * Create individual graphs * ------------------------ foreach foodGroup in animal fruit gra...
阅读全文
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 standardised patients to assess antibiotic dispensing for tuberculosis by pharmacies in urban India: A cross-sectional study. The Lancet Infecti...
阅读全文
比如,我们想直观地看孕期吸烟者者和非吸烟者两组新生儿的出生体重是否有差异,可以通过Stata社区命令betterbar实现。 Stata命令如下: /*读取演示数据*/ webuse lbw /*绘制误差条形图,用前需先安装,如ssc install betterbar,详见文末*/ betterbar bwt, over(smoke) ci 上图是最基本的,默认是水...
阅读全文
* Figure: Horizontal bar with multiple variables global graph_opts /// title(, justification(left) /// color(black) span pos(11)) /// graphregion(color(white)) /// ylab(,angle(0) nogrid) /// xtit(,placement(left) justification(left)) /// yscale(noline) xscale(noline) /// legen...
阅读全文
上图的Stata代码如下: * Figures: bar plot of two variables global graph_opts1 bgcolor(white) graphregion(color(white)) /// legend(region(lc(none) fc(none))) ylabel(,angle(0) nogrid) /// title(, justification(left) color(black) span pos(11)) /// subtitle(, justification(left) c...
阅读全文
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...
阅读全文