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 lsplincom
print(x, ...)
# S3 method for lsplincom
summary(object, ...)
Estimate
A matrix containing eval (grid points), N (effective sample sizes),
tau.cl (point estimates with a basis of order m
), tau.bc (bias corrected point
estimates with a basis of order m.bc
), se.cl (standard error corresponding
to tau.cl), and se.rb (robust standard error).
sup.cval
Critical value for constructing confidence bands.
opt
A list containing options passed to the function.
Outcome variable.
Independent variable. A matrix or data frame.
Group indicator. It may take on multiple discrete values.
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 G
.
Evaluation points. A matrix or data frame.
Number of quantile-spaced evaluating points.
Confidence level used for confidence intervals; default is level=95
.
If TRUE
, the critical value for constructing confidence band is calculated. Default
is band=FALSE
.
Method used to calculate the critical value for confidence bands.
Options are "pl"
for a simulation-based plug-in procedure, and
"wb"
for a wild bootstrap procedure. If band=TRUE
with
cb.method
unspecified, default is cb.method="pl"
.
A matrix containing all grid points used to construct confidence bands. Each row correponds to the coordinates of one grid point.
A numeric vector of the same length as ncol(x)
. Each element corresponds to
the number of grid points for each dimension used to implement uniform inference.
Default is uni.ngrid=50
.
Number of simulated samples used to obtain the critical value for confidence bands.
Default is B=1000
.
Optional rule specifying a subset of observations to be used.
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 ncol(x)
.
If not specified, it uses the number of knots either specified by users
or computed by the companion command lspkselect
to generate the
corresponding knots according to the rule specified by ktype
. See help for lsprobust
.
Arguments to be passed to the function. See lsprobust
.
class lsplincom
objects.
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)
Run the code above in your browser using DataLab