When using rdrobust, I cannot seem to get the "stars" corresponding to the right p-value. Here is an example.
clear all
set obs 1000
gen low = _n < 500
set seed 1004
gen x = runiform(0,1)
gen w = runiform(0,1)
gen z = runiform(0,1)
gen y1 = 0.1*(x > 0.5) + w
gen y2 = 0.05*(x > 0.5) + w
local model 1
foreach outcome in y1 y2 {
foreach low in 0 1 {
quietly rdrobust `outcome' x if low==`low', c(0.5)
collect get e(), tag(outcome[`outcome'] wt[`low'] model[`model'])
collect get controls = "N", tag(outcome[`outcome'] wt[`low'] model[`model'])
local model = `model' + 1
quietly rdrobust `outcome' x if low==`low', c(0.5) covs(z)
collect get e(), tag(outcome[`outcome'] wt[`low'] model[`model'])
collect get controls = "Y", tag(outcome[`outcome'] wt[`low'] model[`model'])
local model = `model' + 1
}
}
collect layout (colname[RD_Estimate]#result[_r_b _r_se] result[controls N]) (outcome#wt#model)
collect stars _r_p .001 "***" .01 "**" .05 "*" .1 "+", attach(_r_b)
collect note "*** p<.001; ** p<.01; * p<.05; + p<.1."
collect preview
Which produces
----------------------------------------------------------------------------------------
| y1 y1 y1 y1 y2 y2 y2 y2
| 0 0 1 1 0 0 1 1
| 1 2 3 4 5 6 7 8
--------------+-------------------------------------------------------------------------
RD_Estimate |
Coefficient | .1432747 .1393473 .1531677* .151766* .0932747 .0893473 .1031677 .101766
Std. error | .0980967 .0967733 .0754744 .0757233 .0980967 .0967733 .0754744 .0757233
controls | N Y N Y N Y N Y
N | 501 501 499 499 501 501 499 499
So, the third coefficient (0.1531677) is significant at the 5% significance level.
However, this coefficient should only be significant at the 10% confidence level as can be checked by estimating
rdrobust y1 x if low==1, c(0.5)
clear all
set obs 1000
gen low = _n < 500
set seed 1004
gen x = runiform(0,1)
gen w = runiform(0,1)
gen z = runiform(0,1)
gen y1 = 0.1*(x > 0.5) + w
gen y2 = 0.05*(x > 0.5) + w
local model 1
foreach outcome in y1 y2 {
foreach low in 0 1 {
quietly rdrobust `outcome' x if low==`low', c(0.5)
collect get e(), tag(outcome[`outcome'] wt[`low'] model[`model'])
collect get controls = "N", tag(outcome[`outcome'] wt[`low'] model[`model'])
local model = `model' + 1
quietly rdrobust `outcome' x if low==`low', c(0.5) covs(z)
collect get e(), tag(outcome[`outcome'] wt[`low'] model[`model'])
collect get controls = "Y", tag(outcome[`outcome'] wt[`low'] model[`model'])
local model = `model' + 1
}
}
collect layout (colname[RD_Estimate]#result[_r_b _r_se] result[controls N]) (outcome#wt#model)
collect stars _r_p .001 "***" .01 "**" .05 "*" .1 "+", attach(_r_b)
collect note "*** p<.001; ** p<.01; * p<.05; + p<.1."
collect preview
Which produces
----------------------------------------------------------------------------------------
| y1 y1 y1 y1 y2 y2 y2 y2
| 0 0 1 1 0 0 1 1
| 1 2 3 4 5 6 7 8
--------------+-------------------------------------------------------------------------
RD_Estimate |
Coefficient | .1432747 .1393473 .1531677* .151766* .0932747 .0893473 .1031677 .101766
Std. error | .0980967 .0967733 .0754744 .0757233 .0980967 .0967733 .0754744 .0757233
controls | N Y N Y N Y N Y
N | 501 501 499 499 501 501 499 499
So, the third coefficient (0.1531677) is significant at the 5% significance level.
However, this coefficient should only be significant at the 10% confidence level as can be checked by estimating
rdrobust y1 x if low==1, c(0.5)

Comment