绘制上图的Stata命令如下: *Figure: scatter plot with fitted line * Load data * --------- sysuse auto, clear * Set graph options * ---- local col_domestic midblue local col_foreign red local transparency %30 local point_width 0 local point_size small * Plot * ---- twoway (scatt...
阅读全文
sysuse auto, clear stripplot mpg, name(ST1, replace)
阅读全文
webuse grunfeld, clear 因为数据需要生成,生成时会覆盖原有数据,为此我们新建一个临时数据框,Stata代码如下: /*创建临时数据框并复制数据*/ frame copy default lian_g /*生成需要的数据并存至临时数据框*/ frame lian_g:statsby mean=r(mean) sd=r(sd) size=r(N), by(year):summarize invest ...
阅读全文
安装: net from http://fmwww.bc.edu/RePEc/bocode/c net describe cibar net install cibar,replace
阅读全文
绘制上图的Stata命令如下: * Figure: Density graph with data points global graph_opts title(, justification(left) color(black) span pos(11)) /// graphregion(color(white)) ylab(,angle(0) nogrid notick) xscale(noline) yscale(noline) yline(0 , lc(black)) /// xtit(,placement(left) ...
阅读全文
绘制上图的Stata命令如下: /********************************************************************************** FIGURE: kernel density graph with mean marker **********************************************************************************/ * Load data * --------- use "http://d...
阅读全文
绘制上图的Stata命令如下: * Figure: 10-25-50-75-90 percentile box plot global graph_opts1 bgcolor(white) graphregion(color(white)) legend(region(lc(none) fc(none))) /// ylab(,angle(0) nogrid) title(, justification(left) color(black) span pos(11)) subtitle(, justification(left)...
阅读全文
webuse lbw frame copy default lian_lbw frame lian_lbw: statsby mean=r(mean) ub=r(ub) lb=r(lb) N=r(N), by(smoke) clear: ci mean bwt frame lian_lbw:local text1 = mean[1] frame lian_lbw:local text2 = mean[2] frame lian_lbw: twoway bar mean smoke, text(3200 0 " Mean:`text1' " ) te...
阅读全文
生成上图的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代码如下: * Figure: horizontal stack bar plot global graph_opts1 /// title(, justification(left) color(black) span pos(11)) /// graphregion(color(white) lc(white) la(center)) ///
阅读全文