The plot method for local polynomial density objects.
A standard ggplot2 object is returned, hence can be used for further customization.
# S3 method for lpcde
plot(
...,
alpha = NULL,
type = NULL,
lty = NULL,
lwd = NULL,
lcol = NULL,
pty = NULL,
pwd = NULL,
pcol = NULL,
y_grid = NULL,
CItype = NULL,
CIuniform = FALSE,
CIsimul = 2000,
CIshade = NULL,
CIcol = NULL,
title = NULL,
xlabel = NULL,
ylabel = NULL,
legendTitle = NULL,
legendGroups = NULL,
rbc = FALSE
)A standard ggplot2 object is returned, hence can be used for further customization.
Class "lpcde" object, obtained from calling lpcde.
Numeric scalar between 0 and 1, specifies the significance level for plotting confidence intervals/bands.
String, one of "line" (default), "points" and "both",
specifies how the point estimates are plotted. If more than one is provided,
they will be applied to each data series accordingly.
Line type for point estimates, only effective if type is "line" or
"both". 1 for solid line, 2 for dashed line, 3 for dotted line.
For other options, see the instructions for ggplot2 . If
more than one is provided, they will be applied to each data series accordingly.
Line width for point estimates, only effective if type is "line" or
"both". Should be strictly positive. For other options, see the instructions for
ggplot2 . If more than one is provided, they will be applied
to each data series accordingly.
Line color for point estimates, only effective if type is "line" or
"both". 1 for black, 2 for red, 3 for green, 4 for blue.
For other options, see the instructions for ggplot2 . If
more than one is provided, they will be applied to each data series
accordingly.
Scatter plot type for point estimates, only effective if type is "points" or
"both". For options, see the instructions for ggplot2 . If
more than one is provided, they will be applied to each data series
accordingly.
Scatter plot size for point estimates, only effective if type is "points" or
"both". Should be strictly positive. If more than one is provided, they will be applied to each data series
accordingly.
Scatter plot color for point estimates, only effective if type is "points" or
"both". 1 for black, 2 for red, 3
for green, 4 for blue.
For other options, see the instructions for ggplot2 . If
more than one is provided, they will be applied to each data series
accordingly.
Numeric vector, specifies a subset of grid points
to plot point estimates. This option is effective only if type is "points" or
"both"; or if CItype is "ebar" or
"all".
String, one of "region" (shaded region, default), "line" (dashed lines),
"ebar" (error bars), "all" (all of the previous) or "none" (no confidence region),
how the confidence region should be plotted. If more than one is provided, they will be applied to each data series
accordingly.
TRUE or FALSE (default), plotting either pointwise confidence intervals (FALSE) or
uniform confidence bands (TRUE).
Positive integer, specifies the number of simulations used to construct critical values (default is 2000). This
option is ignored if CIuniform=FALSE.
Numeric, specifies the opaqueness of the confidence region, should be between 0 (transparent) and
Default is 0.2. If more than one is provided, they will be applied to each data series accordingly.
Color of the confidence region. 1 for black, 2 for red, 3
for green, 4 for blue.
For other options, see the instructions for ggplot2 . If
more than one is provided, they will be applied to each data series
accordingly.
Strings, specifies the title of the plot and labels for the x- and y-axis.
String, specifies the legend title.
String vector, specifies the group names used in legend.
TRUE or FALSE (default), plotting confidence intervals and bands with
standard estimates (FALSE) or RBC estimates (TRUE).
Matias D. Cattaneo, Princeton University. cattaneo@princeton.edu.
Rajita Chandak (maintainer), Princeton University. rchandak@princeton.edu
Michael Jansson, University of California Berkeley. mjansson@econ.berkeley.edu.
Xinwei Ma, University of California San Diego. x1ma@ucsd.edu.
lpcde for local polynomial density estimation.
Supported methods: coef.lpcde, confint.lpcde,
plot.lpcde, print.lpcde,
summary.lpcde, vcov.lpcde