Hi,
I am running an RDD regression with covariates and clustered standard errors using rdrobust package in Stata/SE 16.1. I wanted to plot the RD estimates using confidence intervals as lines. I have tried reproducing the rdplot using a twoway graph and it works well. I am trying to restrict the yscale for better visualization of the plot, but none of the usual options work. Any help will be much appreciated!
Code to reproduce the graph:
I am running an RDD regression with covariates and clustered standard errors using rdrobust package in Stata/SE 16.1. I wanted to plot the RD estimates using confidence intervals as lines. I have tried reproducing the rdplot using a twoway graph and it works well. I am trying to restrict the yscale for better visualization of the plot, but none of the usual options work. Any help will be much appreciated!
Code to reproduce the graph:
Code:
rdrobust y x, c(0) vce(cluster cluster_id) covs(yr1-yr9) local bw=e(h_l) local doublebw=(e(h_l)*2) local halfbw=(e(h_l)/2) local cct_n = e(N_h_l)+e(N_h_r) rdplot y x if inrange(x, -`bw',`bw'), c(0) kernel(triangular) genvars nbins(20 20) covs(yr1-yr9) vce(cluster cluster_id) p(1) hide tw (scatter rdplot_mean_y rdplot_mean_x ) /// (lfitci y x if x < 0 & inrange(x, -`bw', `bw') , ciplot(rline)) /// (lfitci y x if x>= 0 & inrange(x, -`bw', `bw'), ciplot(rline)), /// xline(0)
Comment