| dens_test | R Documentation |
This calls the original DCdensity function which was in the package rdd by Drew Dimmery,
which has been archived and is now internally stored in the Rddtools package.
dens_test(rdd_object, bin = NULL, bw = NULL, plot = TRUE, ...)
rdd_object |
object of class rdd_data |
bin |
the binwidth (defaults to |
bw |
the bandwidth to use (by default uses bandwidth selection calculation from McCrary (2008)) |
plot |
Whether to return a plot. Logical, default to TRUE. |
... |
Further arguments passed to the unexported |
Run the McCracy test for manipulation of the forcing variable
McCrary, Justin. (2008) "Manipulation of the running variable in the regression discontinuity design: A density test," Journal of Econometrics. 142(2): 698-714. \Sexpr[results=rd]{tools:::Rd_expr_doi("http://dx.doi.org/10.1016/j.jeconom.2007.05.005")}
data(house)
house_rdd <- rdd_data(y=house$y, x=house$x, cutpoint=0)
dens_test(house_rdd)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.