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.
Arguments
- X
Numeric vector of the running / forcing variable.
- cutoff
Numeric scalar; the threshold value of
Xdefining the discontinuity (default0).- ...
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
# \donttest{
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)
}
#> $method
#> [1] "rddensity::rddensity"
#>
#> $raw
#> Call:
#> rddensity.
#> Sample size: 1000. Cutoff: 0.
#> Model: unrestricted. Kernel: triangular. VCE: jackknife
# }
