View source: R/lsprobust.plot.R
lsprobust.plot | R Documentation |
lsprobust.plot
plots estimated regression functions and confidence regions using the lspartition package.
See Cattaneo and Farrell (2013) and Cattaneo, Farrell and Feng (2020a) 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 (2020b).
For more details, and related Stata and R packages useful for empirical analysis, visit https://sites.google.com/site/nppackages/.
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)
... |
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. |
Companion command: lsprobust
for partition-based least-squares regression
estimation.
A standard ggplot2
object is returned, hence can be used for further
customization.
Matias D. Cattaneo, Princeton University, Princeton, NJ. cattaneo@princeton.edu.
Max H. Farrell, University of California, Santa Barbara, CA. maxhfarrell@ucsb.edu.
Yingjie Feng (maintainer), Tsinghua University, Beijing, China. fengyingjiepku@gmail.com.
Cattaneo, M. D., M. H. Farrell, and Y. Feng (2020a): Large Sample Properties of Partitioning-Based Series Estimators. Annals of Statistics, 48(3): 1718-1741, 2020.
Cattaneo, M. D., M. H. Farrell, and Y. Feng (2020b): lspartition: Partitioning-Based Least Squares Regression. R Journal, 12(1): 172-187, 2020.
lsprobust
, lspkselect
, lsplincom
, ggplot2
.
x <- runif(500)
y <- sin(4*x)+rnorm(500)
est <- lsprobust(y, x)
lsprobust.plot(est)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.