feasiblePostLassoMatTool {drcarlate}R Documentation

Feasible Post Lasso Mat Tool

Description

Under the condition of high dimensional data, the function first selects covariables through lasso regression, then performs logit regression or linear regression according to the caller's requirements, and finally returns the adjusted Lasso regression coefficient vector. This function has been slightly adapted for this package.

Usage

feasiblePostLassoMatTool(
  x,
  y,
  MaxIter = 30,
  UpsTol = 1e-06,
  beta0 = c(),
  clusterVar = c(),
  Dist = "normal",
  link = "identity",
  glmTol = 1e-08,
  initScale = 0.5
)

Arguments

x

A nxk Matrix.

y

A nx1 vector.

MaxIter

Maximum iteration. The default value is 30.

UpsTol

Upper limit of tolerance. The default value is 1e-6.

beta0

NULL.

clusterVar

NULL.

Dist

The default value is normal.

link

Link can be identity or logit. This determines the method used for regression with the selected write variable after lasso. See Jiang et al. (2022) for more details.

glmTol

Maximum tolerance in GLM. The default value is 1e-8.

initScale

Initial scale, the default value is 0.5.

Value

A kx1 cector, the coefficients b.

References

Belloni, A., Chernozhukov, V., Fernández-Val, I. and Hansen, C. (2017), Program Evaluation and Causal Inference With High-Dimensional Data. Econometrica, 85: 233-298. https://doi.org/10.3982/ECTA12723

Examples

set.seed(1)
# Notice that when we set dgptype = 3, FuncDGP will generate a high dimensional data for us.
DGP <- FuncDGP(dgptype = 3, rndflag = 1, n = 10000, g = 4, pi = c(0.5, 0.5, 0.5, 0.5))
X <- DGP$X
Y <- DGP$Y
A <- DGP$A
S <- DGP$S
D <- DGP$D
feasiblePostLassoMatTool(x = X[S==1 & A==0,], y = Y[S==1 & A==0,])
feasiblePostLassoMatTool(x = X[S==1 & A==0,], y = D[S==1 & A==0,], link = "logit")



[Package drcarlate version 1.2.0 Index]