Description Usage Arguments Details Value References Examples

Nonparametric (kernel regression-based) sharp regression discontinuity controlling for covariates that are permitted to jointly affect the treatment assignment and the outcome at the threshold of the running variable, see Frölich and Huber (2019).

1 2 3 4 5 6 7 8 9 10 |

`y` |
Dependent variable, must not contain missings. |

`z` |
Running variable. Must be coded such that the treatment is zero for |

`x` |
Covariates, must not contain missings. |

`boot` |
Number of bootstrap replications for estimating standard errors. Default is 1999. |

`bw0` |
Bandwidth for a kernel regression of |

`bw1` |
Bandwidth for a kernel regression of |

`regtype` |
Defines the type of the kernel regressions of |

`bwz` |
Bandwidth for the (Epanechnikov) kernel function on |

Sharp regression discontinuity design conditional on covariates to control for observed confounders jointly affecting the treatment assignment and outcome at the threshold of the running variable as discussed in Frölich and Huber (2019). This is implemented by running kernel regressions of the outcome on the running variable and the covariates separately above and below the threshold and by applying a kernel smoother to the running variable around the threshold. The procedure permits choosing kernel bandwidths by cross-validation, even though this does in general not yield the optimal bandwidths for treatment effect estimation (checking the robustness of the results by varying the bandwidths is therefore highly recommended). Standard errors are based on bootstrapping.

`effect`

: Estimated treatment effect at the threshold.

`se`

: Bootstrap-based standard error of the effect estimate.

`pvalue`

: P-value based on the t-statistic.

`bw0`

: Bandwidth for kernel regression of `y`

on `z`

and `x`

below the threshold (for treatment equal to zero).

`bw1`

: Bandwidth for kernel regression of `y`

on `z`

and `x`

above the threshold (for treatment equal to one).

`bwz`

: Bandwidth for the kernel function on `z`

.

Frölich, M. and Huber, M. (2019): "Including covariates in the regression discontinuity design", Journal of Business & Economic Statistics, 37, 736-748.

1 2 3 4 5 6 7 8 9 10 | ```
## Not run:
# load unemployment duration data
data(ubduration)
# run sharp RDD conditional on covariates with user-defined bandwidths
RDDcovar(y=ubduration[,1],z=ubduration[,2],x=ubduration[,c(-1,-2)],
bw0=c(0.17, 1, 0.01, 0.05, 0.54, 70000, 0.12, 0.91, 100000),
bw1=c(0.59, 0.65, 0.30, 0.06, 0.81, 0.04, 0.12, 0.76, 1.03),bwz=0.2,boot=19)
cat("RDD effect estimate: ",round(c(output$effect),3),", standard error: ",
round(c(output$se),3), ", p-value: ", round(c(output$pvalue),3))
## End(Not run)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.