lsprobust.plot {lspartition} | R Documentation |
Graphic Presentation of Results for lspartition Package
Description
lsprobust.plot
plots estimated regression functions and confidence regions using the lspartition package.
See Cattaneo and Farrell (2013) and Cattaneo, Farrell and Feng (2019a) for complete details.
Companion command: lsprobust
for partitioning-based least squares regression
estimation and inference; lsprobust.plot
for plotting results; lsplincom
for multiple sample estimation and inference.
A detailed introduction to this command is given in Cattaneo, Farrell and Feng (2019b).
For more details, and related Stata and R packages useful for empirical analysis, visit https://sites.google.com/site/nppackages/.
Usage
lsprobust.plot(..., alpha = NULL, type = NULL, CS = "ci",
CStype = NULL, title = "", xlabel = "", ylabel = "",
lty = NULL, lwd = NULL, lcol = NULL, pty = NULL, pwd = NULL,
pcol = NULL, CSshade = NULL, CScol = NULL, legendTitle = NULL,
legendGroups = NULL)
Arguments
... |
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 |
CS |
String, type of confidence sets. Options are |
CStype |
String, one of |
title |
String, title of the plot. |
xlabel |
Strings, labels for x-axis. |
ylabel |
Strings, labels for 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 |
CSshade |
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. |
CScol |
Color for confidence region. |
legendTitle |
String, title of legend. |
legendGroups |
String vector, group names used in legend. |
Details
Companion command: lsprobust
for partition-based least-squares regression
estimation.
Value
A standard ggplot2
object is returned, hence can be used for further
customization.
Author(s)
Matias D. Cattaneo, Princeton University, Princeton, NJ. cattaneo@princeton.edu.
Max H. Farrell, University of Chicago, Chicago, IL. max.farrell@chicagobooth.edu.
Yingjie Feng (maintainer), Princeton University, Princeton, NJ. yingjief@princeton.edu.
References
Cattaneo, M. D., M. H. Farrell, and Y. Feng (2019a): Large Sample Properties of Partitioning-Based Series Estimators. Annals of Statistics, forthcoming. arXiv:1804.04916.
Cattaneo, M. D., M. H. Farrell, and Y. Feng (2019b): lspartition: Partitioning-Based Least Squares Regression. R Journal, forthcoming. arXiv:1906.00202.
See Also
lsprobust
, lspkselect
, lsplincom
, ggplot2
.
Examples
x <- runif(500)
y <- sin(4*x)+rnorm(500)
est <- lsprobust(y, x)
lsprobust.plot(est)