lsplincom | R Documentation |
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 (2020a) for complete details.
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/.
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, ...)
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 |
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. |
print(lsplincom)
: print
method for class "lsplincom
".
summary(lsplincom)
: summary
method for class "lsplincom
"
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
, lsprobust.plot
,
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.