英国杜伦大学(Durham University)的Nicholas J. Cox开发了一款用来绘制棘状图的Stata社区命令spineplot,安装的Stata命令如下:
ssc install spineplot, replace
help spineplot
绘制上图的Stata代码如下:
sysuse auto, clear
spineplot foreign rep78, scheme(s1color) percent
参考文献:Speaking Stata: Spineplots and their kin
https://www.stata-journal.com/article.html?article=gr0031
完,本文内容交流请移步: