Mauricio Olivares

R Packages

RATest: A collection of permutation tests

Joint with Ignacio Sarmiento Barbieri.

Description: While permutation tests are known to have attractive properties in finite samples under the so-called randomization hypothesis, this is not the case for a plethora of testing problems that researchers encounter in practice. This R package presents various functions to perform valid permutation-based inference in these scenarios in a straightforward way.

This literature is continuously growing in many exciting directions. Currently, this R package implements the following theoretical developments:

This is the theory based on Chung and Romano (2013). Additional information regarding the testing problem of comparison of parameters can be found here

This is an implementation of Canay and Kamat (2018). This is a permutation test for testing the hypothesis of continuity of the distribution of baseline covariates at the cut-off in regression discontinuity designs. This vignette illustrates how to apply the permutation test with an empirical illustration based on Lee (2008). I also recommend this tutorial, written by co-creator Ignacio Sarmiento Barbieri for R-Bloggers.

This is an implementation of the martingale-based permutation test for testing heterogeneity in the treatment effect in Chung and Olivares (2020). Moreover, this R package also includes the extension to testing heterogeneity within subgroups defined by observable covariates. This approach comprises testing the joint null hypothesis that treatment effects are constant within mutually exclusive subgroups while allowing the treatment effects to vary across subgroups.

Permutation test for the classical two-sample goodness-of-fit testing problem under covariate-adaptive randomization. The permutation test in here is based on prepivoting the Kolmogorov-Smirnov test statistic. This package implements a bayesian bootstrap for the CDF transformation step needed for prepivoting.