Description Usage Arguments Details Value Author(s) Examples
View source: R/rdd_data_methods.R
Binned plot of the forcing and outcome variable
1 2 3 4 5 6 7 8 9 10 11 |
x |
Object of class rdd_data |
h |
The binwidth parameter (note this differs from the bandwidth parameter!) |
nbins |
Alternative to h, the total number of bins in the plot. |
xlim |
The range of the x data |
cex |
Size of the points, see |
nplot |
Number of plot to draw |
device |
Type of device used. Currently not used. |
... |
Further arguments passed to the |
Produces a simple binned plot averaging values within each interval. The length of the intervals
is specified with the argument h
, specifying the whole binwidth (contrary to the usual bandwidth
argument, that gives half of the length of the kernel window.
When no bandwidth is given, the bandwidth of Ruppert et al is used, see rdd_bw_rsw
.
A plot
Matthieu Stigler <Matthieu.Stigler@gmail.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | data(house)
house_rdd <- rdd_data(y=house$y, x=house$x, cutpoint=0)
plot(house_rdd)
## Specify manually the bandwidth:
plot(house_rdd, h=0.2)
## Show three plots with different bandwidth:
plot(house_rdd, h=c(0.2,0.3,0.4), nplot=3)
## Specify instead of the bandwidth, the final number of bins:
plot(house_rdd, nbins=22)
## If the specified number of bins is odd, the larger number is given to side with largest range
plot(house_rdd, nbins=21)
|
Loading required package: AER
Loading required package: car
Loading required package: carData
Loading required package: lmtest
Loading required package: zoo
Attaching package: 'zoo'
The following objects are masked from 'package:base':
as.Date, as.Date.numeric
Loading required package: sandwich
Loading required package: survival
Loading required package: np
Nonparametric Kernel Methods for Mixed Datatypes (version 0.60-9)
[vignette("np_faq",package="np") provides answers to frequently asked questions]
[vignette("np",package="np") an overview]
[vignette("entropy_np",package="np") an overview of entropy-based methods]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.