RDperm function

Regression Discontinuity Design Permutation Test

Regression Discontinuity Design Permutation Test

A permutation test for continuity of covariates in Sharp Regression Discontinuity Design as described in Canay and Kamat (2018).

RDperm( W, z, data, n.perm = 499, q_type = 10, cutoff = 0, test.statistic = "CvM" )

Arguments

  • W: Character. Vector of covariates names. The procedure will test the null hypothesis of continuity of the distribution of each element in W at the cutoff.
  • z: Character. Running variable name. This is the scalar random variable that defines, along with the cutoff, the treatment assignment rule in the sharp regression discontinuity design.
  • data: Data.frame.
  • n.perm: Numeric. Number of permutations needed for the stochastic approximation of the p-values. See remark 3.2 in Canay and Kamat (2018). The default is B=499.
  • q_type: A fixed and small (relative to the sample size) natural number that will define the qq closest values of the order statistic of ZZ to the right and to the left of the cutoff. The default, 'rot', value is given by the feasible rule of thumb in footnote 4 of Canay and Kamat (2018), section 3.1. If 'arot', it calls for the Rule of Thumb described in equation (15) of Canay and Kamat (2018), section 3.1. The default option grows at a slower rate than the optional rule of thumb, but adds a larger constant.
  • cutoff: Numeric. The scalar defining the threshold of the running variable.
  • test.statistic: Character. A rank test statistic satisfying rank invariance. The default is a Cramer-von Mises test statistic.

Returns

The functions summary and plot are used to obtain and print a summary and plot of the estimated regression discontinuity. The object of class RDperm is a list containing the following components: - results: Matrix. Test Statistic, P-values and Q

  • test.statistic: Test Statistic

  • q_type: Type of Q used in the calculations, can be either, "Defined by User", the "Rule of Thumb" or the "Alternative Rule of Thumb".

  • n_perm: number of permutations

  • rv: Character. Running variable name

  • Z: Vector. Running Variable

  • cutoff: cutoff

  • data: data set

  • S: Matrix. Pooled sample of induced order statistics

  • S_perm: List. Permutations of the induced order statistic.

Examples

permtest<-RDperm(W=c("demshareprev"),z="difdemshare",data=lee2008) summary(permtest) ## Not run: permtest<-RDperm(W=c("demshareprev","demwinprev"),z="difdemshare",data=lee2008) summary(permtest) ## End(Not run)

References

Canay, I and Kamat V, (2018) Approximate Permutation Tests and Induced Order Statistics in the Regression Discontinuity Design. The Review of Economic Studies, 85(3): 1577-1608

Author(s)

Maurcio Olivares

Ignacio Sarmiento Barbieri

  • Maintainer: Mauricio Olivares
  • License: GPL (>= 2)
  • Last published: 2022-09-29

Useful links