# NOT RUN {
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)
# }
Run the code above in your browser using DataLab