I run rdrobust, and then plot the estimates using the coefplot command. I plug in options that allow the significance stars to be shown on top of the point estimates. Now rdrobust has three p-values (conventional, bias-corrected and robust), but I can only see the significance stars in the figure based on the first (conventional) p-value. This is the code I use:
Can I modify the coefplot command such that I can get the significance stars based on the bias-corrected or robust p-values?
Code:
local outcomes Y1 Y3aplus Y3bplus local subgroups "if imp_m==0" "if UR_reg==1 & imp_m==0" "if UR_reg==0 & imp_m==0" "if imp_m==0 & poor==1" "if imp_m==0 & poor==0" local labels "Total" "Urban" "Rural" "Poor" "Non-poor" local i=1 foreach outcome in Y1 Y3aplus Y3bplus { local j=1 foreach subgroup in "if imp_m==0" "if UR_reg==1 & imp_m==0" "if UR_reg==0 & imp_m==0" "if imp_m==0 & poor==1" "if imp_m==0 & poor==0" { if strpos("`subgroup'", "UR_reg") >= 0 { rdrobust `outcome' X `subgroup', kernel(triangular) vce(cluster X) covs(region_dummy*) } else { rdrobust `outcome' X `subgroup', kernel(triangular) vce(cluster X) covs(UR_reg region_dummy*) } //estimates store result`i' , title("`outcome' `labels[`j']'") estimates store X_result`i' estimates restore X_result`i' estadd local title "`outcome' `labels[`j']'" local i = `i' + 1 local j = `j' + 1 } } * Use coefplot to plot the stored estimates coefplot (X_result1, label("Utilization Total (1)")) (X_result2, label("Utilization in Urban (1)")) (X_result3, label("Utilization in Rural (1)")) (X_result4, label("Utilization by Poor (1)")) (X_result5, label("Utilization by Non-poor (1)")) /// (X_result6, label("Utilization Total (3a)")) (X_result7, label("Utilization in Urban (3a)")) (X_result8, label("Utilization in Rural (3a)")) (X_result9, label("Utilization by Poor (3a)")) (X_result10, label("Utilization by Non-poor (3a)")) /// (X_result11, label("Utilization Total (3b)")) (X_result12, label("Utilization in Urban (3b)")) (X_result13, label("Utilization in Rural (3b)")) (X_result14, label("Utilization by Poor (3b)")) (X_result15, label("Utilization by Non-poor (3b)")), /// drop(_cons) xline(0) /// title(Pooled Cutoff) /// mlabel(cond(@pval<.001, "***", /// cond(@pval<.01, "**", /// cond(@pval<.05, "*", /// cond(@pval>=.05, " ", /// string(@pval)))))) note("p-values shown alongside markers" "* p<0.05, ** p<0.01, *** p<0.001")
Comment