lsplincom {lspartition} | R Documentation |
Linear Combination of Estimators for lspartition Package
Description
lsplincom
implements user-specified linear combinations across different data sub-groups for regression functions estimation, and computes corresponding (pointwise and uniform) robust bias-corrected inference measures. Estimation and inference is implemented using the lspartition package.
See Cattaneo and Farrell (2013) and Cattaneo, Farrell and Feng (2019a) for complete details.
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
lsplincom(y, x, G, R, eval = NULL, neval = NULL, level = 95,
band = FALSE, cb.method = NULL, cb.grid = NULL, cb.ngrid = 50,
B = 1000, subset = NULL, knot = NULL, ...)
## S3 method for class 'lsplincom'
print(x, ...)
## S3 method for class 'lsplincom'
summary(object, ...)
Arguments
y |
Outcome variable. |
x |
Independent variable. A matrix or data frame. |
G |
Group indicator. It may take on multiple discrete values. |
R |
A numeric vector giving the linear combination of interest. Each element is the coefficient
of the conditional mean estimator of one group, and they are ordered ascendingly along the value
of |
eval |
Evaluation points. A matrix or data frame. |
neval |
Number of quantile-spaced evaluating points. |
level |
Confidence level used for confidence intervals; default is |
band |
If |
cb.method |
Method used to calculate the critical value for confidence bands.
Options are |
cb.grid |
A matrix containing all grid points used to construct confidence bands. Each row correponds to the coordinates of one grid point. |
cb.ngrid |
A numeric vector of the same length as |
B |
Number of simulated samples used to obtain the critical value for confidence bands.
Default is |
subset |
Optional rule specifying a subset of observations to be used. |
knot |
A list of numeric vectors giving the knot positions (including boundary knots) for each dimension
which are used in the main regression. The length of the list is equal to |
... |
Arguments to be passed to the function. See |
object |
class |
Value
Estimate |
A matrix containing eval (grid points), N (effective sample sizes),
tau.cl (point estimates with a basis of order |
sup.cval |
Critical value for constructing confidence bands. |
opt |
A list containing options passed to the function. |
Methods (by generic)
-
print
:print
method for class "lsplincom
". -
summary
:summary
method for class "lsplincom
"
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
, lsprobust.plot
,
Examples
x <- runif(500)
y <- sin(4*x)+rnorm(500)
z <- c(rep(0, 250), rep(1, 250))
est <- lsplincom(y, x, z, c(-1, 1))
summary(est)