绘制上图的Stata代码如下: *Figure: Line plots witthed line with confidence interval * Load data set use "http://ds.epiman.cn/uploads/2022/06/line-fit-text.dta", clear * Treament effect reg y_var x_var post x_var_post control * Save coefficients for graph local beta_pre = round...
阅读全文
绘制上图的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: Scatter plot with fitted line and confidence interval * Load data use "https://github.com/worldbank/stata-visual-library/raw/master/Library/data/scatter-fl-ci.dta", clear *数据不存在* * Graph twoway /// (lfitci jobs_scarce_code avg_growth ) /...
阅读全文
*FIGURE: Scatter plot with transparent points sysuse auto, clear scatter price mpg /// , /// mcolor(midblue%50) /// the value after % sets the transparency mlwidth(0) /// set width of border to 0 graphregion(color(white)) * Have a lovely day! * Source: https://worldbank.github...
阅读全文
生成上图的Stata代码如下: * Figure: Scatter plot with polynomial smoothing and confidence interval ************************************** *** Notes *** ************************************** /* *requires user written command grc1leg 1. findit grc1leg 2. select: grc1leg from ht...
阅读全文
绘制上图的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...
阅读全文
生成上图的Stata命令如下: *Figure: Shaded k-density functions * Packages required ssc install akdensity * Load data use "http://ds.epiman.cn/uploads/2022/06/density-shaded.dta", replace * Create variable used for graph sort beta_ gen rank = _n * Calculate parameters for graph ...
阅读全文
绘制上图的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)...
阅读全文