Skip to contents

Thin extender over rddensity::rddensity for the manipulation / discontinuity-in-density test of Cattaneo, Jansson & Ma (2020), the modern replacement for the original McCrary (2008) test.

Usage

morie_rdd_density_test(X, cutoff = 0, ...)

Arguments

X

Numeric vector of the running / forcing variable.

cutoff

Numeric scalar; the threshold value of X defining the discontinuity (default 0).

...

Further arguments forwarded to rddensity::rddensity (e.g. p, q, kernel, vce, h).

Value

A list with $method = "rddensity::rddensity" and $raw (an rddensity object containing the estimates and the manipulation test statistic).

Examples

if (FALSE) { # \dontrun{
  if (requireNamespace("rddensity", quietly = TRUE)) {
    set.seed(1)
    x <- c(rnorm(500, -0.2), rnorm(500, 0.2))
    morie_rdd_density_test(x, cutoff = 0)
  }
} # }