Calculates the empirical CDF of the sample of \(W\) conditional on \(Z\) being close to the cutoff from either the left or right. Given the induced order for the baseline covariates $$W^{-}_{[q]}, W^{-}_{[q-1]},\dots\le W^{-}_{[1]}$$ or $$W^{+}_{[1]}, W^{+}_{[2]},\dots, W^{+}_{[q]}$$, this function will calculate either $$H^-_n(t)=\frac{1}{q}\sum_{i=1}^q I\{W^{-}_{[i]}\le t\}$$ or $$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).
H.cdf(W, t)
| W | Numeric. The sample of induced order statistics. The input can be either \(\{W^{-}_{[q]}, W^{-}_{[q-1]},\dots, W^{-}_{[1]}\}\) or \(\{W^{+}_{[1]}, W^{+}_{[2]},\dots, W^{+}_{[q]}\}\). |
|---|---|
| t | Numeric. The scalar needed for the calculation of the CDF. |
Numeric. For a sample \(W=(w_1,\dots,w_n)\), returns the fraction of observations less or equal to \(t\).
Canay, I and Kamat V, (2017) Approximate Permutation Tests and Induced Order Statistics in the Regression Discontinuity Design. http://faculty.wcas.northwestern.edu/~iac879/wp/RDDPermutations.pdf