H.cdf {RATest}R Documentation

Regression Discontinuity Design Permutation test

Description

Calculates the empirical CDF of the sample of WW conditional on ZZ being close to the cutoff from either the left or right. Given the induced order for the baseline covariates

W[q],W[q1],W[1]W^{-}_{[q]}, W^{-}_{[q-1]},\dots\le W^{-}_{[1]}

or

W[1]+,W[2]+,,W[q]+W^{+}_{[1]}, W^{+}_{[2]},\dots, W^{+}_{[q]}

, this function will calculate either

Hn(t)=1qi=1qI{W[i]t}H^-_n(t)=\frac{1}{q}\sum_{i=1}^q I\{W^{-}_{[i]}\le t\}

or

Hn+(t)=1qi=1qI{W[i]+t}H^+_n(t)=\frac{1}{q}\sum_{i=1}^q I\{W^{+}_{[i]}\le t\}

depending on the argument of the function. See section 3 in Canay & Kamat (2017).

Usage

H.cdf(W, t)

Arguments

W

Numeric. The sample of induced order statistics. The input can be either {W[q],W[q1],,W[1]}\{W^{-}_{[q]}, W^{-}_{[q-1]},\dots, W^{-}_{[1]}\} or {W[1]+,W[2]+,,W[q]+}\{W^{+}_{[1]}, W^{+}_{[2]},\dots, W^{+}_{[q]}\}.

t

Numeric. The scalar needed for the calculation of the CDF.

Value

Numeric. For a sample W=(w1,,wn)W=(w_1,\dots,w_n), returns the fraction of observations less or equal to tt.

Author(s)

Maurcio Olivares

Ignacio Sarmiento Barbieri

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


[Package RATest version 0.1.10 Index]