Description Usage Arguments Value Author(s) Examples
Construct the base RDD object, containing x, y and the cutpoint, eventuallay covariates.
1 |
y |
Output |
x |
Forcing variable |
covar |
Exogeneous variables |
cutpoint |
Cutpoint |
z |
Assignment variable for the fuzzy case. Should be 0/1 or TRUE/FALSE variable. |
labels |
Additional labels to provide as list (with entries |
data |
A data-frame for the |
Object of class rdd_data
, inheriting from data.frame
Matthieu Stigler <Matthieu.Stigler@gmail.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | data(house)
rd<- rdd_data(x=house$x, y=house$y, cutpoint=0)
rd2 <- rdd_data(x=x, y=y, data=house, cutpoint=0)
# The print() function is the same as the print.data.frame:
rd
# The summary() and plot() function are specific to rdd_data
summary(rd)
plot(rd)
# for the fuzzy case, you need to specify the assignment variable z:
rd_dat_fakefuzzy <- rdd_data(x=house$x, y=house$y,
z=ifelse(house$x>0+rnorm(nrow(house), sd=0.05),1,0),
cutpoint=0)
summary(rd_dat_fakefuzzy)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.