desla | R Documentation |
Calculates the desparsified lasso as originally introduced in \insertCitevandeGeer14;textualdesla, and provides inference suitable for high-dimensional time series, based on the long run covariance estimator in \insertCiteadamek2020lasso;textualdesla.
desla(
X,
y,
H,
alphas = 0.05,
penalize_H = TRUE,
R = NULL,
q = NULL,
demean = TRUE,
scale = TRUE,
progress_bar = TRUE,
parallel = TRUE,
threads = NULL,
PI_constant = NULL,
LRV_bandwidth = NULL
)
X |
|
y |
|
H |
indexes of relevant regressors |
alphas |
(optional) vector of significance levels (0.05 by default) |
penalize_H |
(optional) boolean, true if you want the variables in H to be penalized ( |
R |
(optional) matrix with number of columns the dimension of |
q |
(optional) vector of size same as the rows of |
demean |
(optional) boolean, true if |
scale |
(optional) boolean, true if |
progress_bar |
(optional) boolean, displays a progress bar while running if true, tracking the progress of estimating the nodewise regressions (TRUE by default) |
parallel |
boolean, whether parallel computing should be used (TRUE by default) |
threads |
(optional) integer, how many threads should be used for parallel computing if |
PI_constant |
(optional) constant, used in the plug-in selection method (0.8 by default). For details see \insertCiteadamek2020lasso;textualdesla |
LRV_bandwidth |
(optional) vector of parameters controlling the bandwidth |
Returns a list with the following elements:
bhat |
desparsified lasso estimates for the parameters indexed by |
standard_errors |
standard errors of the estimates for variables indexed by |
intervals |
matrix containing the confidence intervals for parameters indexed in |
betahat |
lasso estimates from the initial regression of |
DSL_matrices |
list containing the matrices |
residuals |
list containing the vector of residuals from the initial lasso regression ( |
lambdas |
values of lambda selected in the initial lasso regression ( |
selected_vars |
vector of indexes of the nonzero parameters in the initial lasso ( |
wald_test |
list containing elements for inference on |
X<-matrix(rnorm(50*50), nrow=50)
y<-X[,1:4] %*% c(1, 2, 3, 4) + rnorm(50)
H<-c(1, 2, 3, 4)
d<-desla(X, y, H)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.