RDScatter {RDHonest} | R Documentation |
Scatterplot of binned raw observations
Description
Scatterplot of raw observations in which each point corresponds to an binned average.
Usage
RDScatter(
formula,
data,
subset,
cutoff = 0,
na.action,
avg = 10,
xlab = NULL,
ylab = NULL,
vert = TRUE,
propdotsize = FALSE
)
Arguments
formula |
object of class |
data |
optional data frame, list or environment (or object coercible by
|
subset |
optional vector specifying a subset of observations to be used in the fitting process. |
cutoff |
specifies the RD cutoff for the running variable. |
na.action |
function which indicates what should happen when the data
contain |
avg |
Number of observations to average over. If set to |
xlab , ylab |
x- and y-axis labels |
vert |
Draw a vertical line at cutoff? |
propdotsize |
If |
Value
An object of class "ggplot"
, a scatterplot the binned raw
observations.
Note
subset
is evaluated in the same way as variables in formula
,
that is first in data
and then in the environment of formula
.
Examples
RDScatter(log(earnings)~yearat14, data=cghs, cutoff=1947,
avg=Inf, propdotsize=TRUE)