coefplot with rdrobust

701 views Asked by At

In Stata I'm trying to plot the coefficients of rdrobust estimates using coefplot:

foreach depvar of varlist var1 var2 var3 var4 {
    rdrobust `depvar' running_variable, kernel(triangular) bwselect(cerrd) p(1)
    estimates store  `depvar'
}

coefplot _est_var1 _est_var2 _est_var3 _est_var4 , replace xline(0)

But I get the following error message:

estimation result _est_var1 not found

Anyone knows how to solve this?

1

There are 1 answers

4
Zhiqiang Wang On

I have only changed the last line of your code and I wonder if it would work. As I do not have your data, I have not tested.

foreach depvar of varlist var1 var2 var3 var4{
  rdrobust `depvar' running_variable, kernel(triangular) bwselect(cerrd) p(1)
  estimates store  `depvar'
}
coefplot var1 var2 var3 var4, replace xline(0)