View source: R/nprobust.plot.R
| nprobust.plot | R Documentation |
nprobust Package.nprobust.plot plots estimated density and regression function using the nprobust package. A detailed introduction to this command is given in Calonico, Cattaneo and Farrell (2019).
Companion commands: lprobust for local polynomial point estimation and inference procedures, and kdrobust for kernel density point estimation and inference procedures.
For more details and related software useful for empirical analysis, visit https://nppackages.github.io/.
nprobust.plot(..., alpha = NULL, type = NULL, CItype = NULL,
title = "", xlabel = "", ylabel = "", lty = NULL, lwd = NULL,
lcol = NULL, pty = NULL, pwd = NULL, pcol = NULL, CIshade = NULL,
CIcol = NULL, legendTitle = NULL, legendGroups = NULL)
... |
Objects returned by |
alpha |
Numeric scalar between 0 and 1, the significance level for plotting confidence regions. If more than one is provided, they will be applied to data series accordingly. |
type |
String, one of |
CItype |
String, one of |
title, xlabel, ylabel |
Strings, title of the plot and labels for x- and y-axis. |
lty |
Line type for point estimates, only effective if |
lwd |
Line width for point estimates, only effective if |
lcol |
Line color for point estimates, only effective if |
pty |
Scatter plot type for point estimates, only effective if |
pwd |
Scatter plot size for point estimates, only effective if |
pcol |
Scatter plot color for point estimates, only effective if |
CIshade |
Numeric, opaqueness of the confidence region, should be between 0 (transparent) and 1. Default is 0.2. If more than one is provided, they will be applied to data series accordingly. |
CIcol |
color for confidence region. |
legendTitle |
String, title of legend. |
legendGroups |
String Vector, group names used in legend. |
Companion commands: lprobust for local polynomial point estimation and inference, and kdrobust for kernel density point estimation and inference.
A standard ggplot2 object is returned, hence can be used for further customization.
Sebastian Calonico, University of California, Davis, CA. scalonico@ucdavis.edu.
Matias D. Cattaneo, Princeton University, Princeton, NJ. matias.d.cattaneo@gmail.com.
Max H. Farrell, University of California, Santa Barbara, CA. mhfarrell@gmail.com.
Calonico, S., M. D. Cattaneo, and M. H. Farrell. 2019. nprobust: Nonparametric Kernel-Based Estimation and Robust Bias-Corrected Inference. Journal of Statistical Software, 91(8): 1-33. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.18637/jss.v091.i08")}.
lprobust, kdrobust, ggplot2
x <- runif(500)
y <- sin(4*x) + rnorm(500)
est <- lprobust(y,x)
nprobust.plot(est)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.