Stata如何绘制中心条形图?

中心条形图(Centred Bar Plot) Centred bar plots are used to show the frequency (absolute or relative) of the y-variable as centred horizontal bars. These are commonly used in archaeology and may also be known as battleship curves or battleship diagrams.

英国杜伦大学(Durham University)的Nicholas J. Cox开发了一款Stata社区命令cbarplot,用来绘制中心条形图。

安装Stata社区命令cbarplot的Stata命令如下:


ssc install cbarplot, replace

演示命令如下:


sysuse auto, clear
cbarplot rep78 , by(foreign)  percent(rep78)  ysc(reverse)
cbarplot rep78 foreign,  percent(rep78)  ysc(reverse)

完,本文内容交流请移步: