RATest R package

CRAN_Status_Badge

A collection of randomization tests, data sets, and examples. The current version focuses on the following testing problems and their implementation

  1. Two-sample permutation inference of equality of parameters. Examples include comparisons of means, medians, and variances from k populations. The tests we cover here are asympotically valid but they remain exact in finite samples if the underlying distributions are identical.
  2. Testing the continuity assumption of the baseline covariates in the sharp regression discontinuity design (RDD) as in Canay and Kamat (2018). More specifically, it allows the user to select a set of covariates and test the aforementioned hypothesis using a permutation test based on the Cramer-von Misses test statistic. Graphical inspection of the empirical CDF and histograms for the variables of interest is also supported in the package.
  3. Testing for heterogeneous treament effects in the presence of a nuisance parameter. The test we present here is based on the Khmaladze transformation. See Chung and Olivares (2021) for more details.
  4. The two-sample goodness-of-fit testing problem under covariate adaptive randomization and implements a permutation test based on a prepivoted Kolmogorov-Smirnov test statistic.
  5. Asymptotically valid permutation test based on the quantile process for the hypothesis of constant quantile treatment effects in the presence of an estimated nuisance parameter.