Title: | Doubly Debiased Lasso (DDL) |
---|---|
Description: | Statistical inference for the regression coefficients in high-dimensional linear models with hidden confounders. The Doubly Debiased Lasso method was proposed in <arXiv:2004.03758>. |
Authors: | Domagoj Ćevid [aut], Chengzhu Huang [aut], Zijian Guo [aut, cre], Peter Bühlmann [aut] |
Maintainer: | Zijian Guo <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.0.2 |
Built: | 2024-12-14 06:26:40 UTC |
Source: | CRAN |
generic function
ci(x, alpha = 0.05, alternative = c("two.sided", "less", "greater"))
ci(x, alpha = 0.05, alternative = c("two.sided", "less", "greater"))
x |
An object of class |
alpha |
alpha Level of significance to construct confidence interval |
alternative |
indicates the alternative hypothesis to construct confidence interval and must be one of "two.sided" (default), "less", or "greater". |
index = 1 n=100 p=200 s=5 q=3 sigmaE=2 sigma=2 pert=1 H = pert*matrix(rnorm(n*q,mean=0,sd=1),n,q,byrow = TRUE) Gamma = matrix(rnorm(q*p,mean=0,sd=1),q,p,byrow = TRUE) #value of X independent from H E = matrix(rnorm(n*p,mean=0,sd=sigmaE),n,p,byrow = TRUE) #defined in eq. (2), high-dimensional measured covariates X = E + H %*% Gamma delta = matrix(rnorm(q*1,mean=0,sd=1),q,1,byrow = TRUE) #px1 matrix, creates beta with 1s in the first s entries and the remaining p-s as 0s beta = matrix(rep(c(1,0),times = c(s,p-s)),p,1,byrow = TRUE) #nx1 matrix with values of mean 0 and SD of sigma, error in Y independent of X nu = matrix(rnorm(n*1,mean=0,sd=sigma),n,1,byrow = TRUE) #eq. (1), the response of the Structural Equation Model Y = X %*% beta + H %*% delta + nu result = DDL(X, Y, index) # default alpha is 0.05 ci(result, alpha = 0.05) ci(result, alpha = 0.05, alternative = "less") ci(result, alpha = 0.05, alternative = "greater")
index = 1 n=100 p=200 s=5 q=3 sigmaE=2 sigma=2 pert=1 H = pert*matrix(rnorm(n*q,mean=0,sd=1),n,q,byrow = TRUE) Gamma = matrix(rnorm(q*p,mean=0,sd=1),q,p,byrow = TRUE) #value of X independent from H E = matrix(rnorm(n*p,mean=0,sd=sigmaE),n,p,byrow = TRUE) #defined in eq. (2), high-dimensional measured covariates X = E + H %*% Gamma delta = matrix(rnorm(q*1,mean=0,sd=1),q,1,byrow = TRUE) #px1 matrix, creates beta with 1s in the first s entries and the remaining p-s as 0s beta = matrix(rep(c(1,0),times = c(s,p-s)),p,1,byrow = TRUE) #nx1 matrix with values of mean 0 and SD of sigma, error in Y independent of X nu = matrix(rnorm(n*1,mean=0,sd=sigma),n,1,byrow = TRUE) #eq. (1), the response of the Structural Equation Model Y = X %*% beta + H %*% delta + nu result = DDL(X, Y, index) # default alpha is 0.05 ci(result, alpha = 0.05) ci(result, alpha = 0.05, alternative = "less") ci(result, alpha = 0.05, alternative = "greater")
'ci' method for class 'DDL'
## S3 method for class 'DDL' ci(x, alpha = 0.05, alternative = c("two.sided", "less", "greater"))
## S3 method for class 'DDL' ci(x, alpha = 0.05, alternative = c("two.sided", "less", "greater"))
x |
An object of class 'DDL' |
alpha |
alpha Level of significance to construct confidence interval |
alternative |
indicates the alternative hypothesis to construct confidence interval and must be one of "two.sided" (default), "less", or "greater". |
index = 1 n=100 p=200 s=5 q=3 sigmaE=2 sigma=2 pert=1 H = pert*matrix(rnorm(n*q,mean=0,sd=1),n,q,byrow = TRUE) Gamma = matrix(rnorm(q*p,mean=0,sd=1),q,p,byrow = TRUE) #value of X independent from H E = matrix(rnorm(n*p,mean=0,sd=sigmaE),n,p,byrow = TRUE) #defined in eq. (2), high-dimensional measured covariates X = E + H %*% Gamma delta = matrix(rnorm(q*1,mean=0,sd=1),q,1,byrow = TRUE) #px1 matrix, creates beta with 1s in the first s entries and the remaining p-s as 0s beta = matrix(rep(c(1,0),times = c(s,p-s)),p,1,byrow = TRUE) #nx1 matrix with values of mean 0 and SD of sigma, error in Y independent of X nu = matrix(rnorm(n*1,mean=0,sd=sigma),n,1,byrow = TRUE) #eq. (1), the response of the Structural Equation Model Y = X %*% beta + H %*% delta + nu result = DDL(X, Y, index) # default alpha is 0.05 ci(result, alpha = 0.05) ci(result, alpha = 0.05, alternative = "less") ci(result, alpha = 0.05, alternative = "greater")
index = 1 n=100 p=200 s=5 q=3 sigmaE=2 sigma=2 pert=1 H = pert*matrix(rnorm(n*q,mean=0,sd=1),n,q,byrow = TRUE) Gamma = matrix(rnorm(q*p,mean=0,sd=1),q,p,byrow = TRUE) #value of X independent from H E = matrix(rnorm(n*p,mean=0,sd=sigmaE),n,p,byrow = TRUE) #defined in eq. (2), high-dimensional measured covariates X = E + H %*% Gamma delta = matrix(rnorm(q*1,mean=0,sd=1),q,1,byrow = TRUE) #px1 matrix, creates beta with 1s in the first s entries and the remaining p-s as 0s beta = matrix(rep(c(1,0),times = c(s,p-s)),p,1,byrow = TRUE) #nx1 matrix with values of mean 0 and SD of sigma, error in Y independent of X nu = matrix(rnorm(n*1,mean=0,sd=sigma),n,1,byrow = TRUE) #eq. (1), the response of the Structural Equation Model Y = X %*% beta + H %*% delta + nu result = DDL(X, Y, index) # default alpha is 0.05 ci(result, alpha = 0.05) ci(result, alpha = 0.05, alternative = "less") ci(result, alpha = 0.05, alternative = "greater")
Computes the Doubly Debiased Lasso estimator of a single regression coefficient in the high-dimensional linear model with hidden confounders. It also constructs the confidence interval for the target regression coefficient.
DDL(X, Y, index, rho = 0.5, rhop = 0.5)
DDL(X, Y, index, rho = 0.5, rhop = 0.5)
X |
the covariates matrix, of dimension |
Y |
the outcome vector, of length |
index |
the vector of indexes for the regression coefficient of interest |
rho |
the trim level for |
rhop |
the trim level for |
index |
the vector of indexes for the regression coefficient of interest |
est_ddl |
The vector of the Doubly Debiased Lasso estimator of the target regression coefficient |
se |
The vector of the standard error of the Doubly Debiased Lasso estimator |
est_init |
The vector of the spectral deconfounding estimator of the whole regression vector |
index = c(1,2,10) n=100 p=200 s=5 q=3 sigmaE=2 sigma=2 pert=1 H = pert*matrix(rnorm(n*q,mean=0,sd=1),n,q,byrow = TRUE) Gamma = matrix(rnorm(q*p,mean=0,sd=1),q,p,byrow = TRUE) #value of X independent from H E = matrix(rnorm(n*p,mean=0,sd=sigmaE),n,p,byrow = TRUE) #defined in eq. (2), high-dimensional measured covariates X = E + H %*% Gamma delta = matrix(rnorm(q*1,mean=0,sd=1),q,1,byrow = TRUE) #px1 matrix, creates beta with 1s in the first s entries and the remaining p-s as 0s beta = matrix(rep(c(1,0),times = c(s,p-s)),p,1,byrow = TRUE) #nx1 matrix with values of mean 0 and SD of sigma, error in Y independent of X nu = matrix(rnorm(n*1,mean=0,sd=sigma),n,1,byrow = TRUE) #eq. (1), the response of the Structural Equation Model Y = X %*% beta + H %*% delta + nu result = DDL(X, Y, index) summary(result)
index = c(1,2,10) n=100 p=200 s=5 q=3 sigmaE=2 sigma=2 pert=1 H = pert*matrix(rnorm(n*q,mean=0,sd=1),n,q,byrow = TRUE) Gamma = matrix(rnorm(q*p,mean=0,sd=1),q,p,byrow = TRUE) #value of X independent from H E = matrix(rnorm(n*p,mean=0,sd=sigmaE),n,p,byrow = TRUE) #defined in eq. (2), high-dimensional measured covariates X = E + H %*% Gamma delta = matrix(rnorm(q*1,mean=0,sd=1),q,1,byrow = TRUE) #px1 matrix, creates beta with 1s in the first s entries and the remaining p-s as 0s beta = matrix(rep(c(1,0),times = c(s,p-s)),p,1,byrow = TRUE) #nx1 matrix with values of mean 0 and SD of sigma, error in Y independent of X nu = matrix(rnorm(n*1,mean=0,sd=sigma),n,1,byrow = TRUE) #eq. (1), the response of the Structural Equation Model Y = X %*% beta + H %*% delta + nu result = DDL(X, Y, index) summary(result)
'summary' method for class 'DDL'
## S3 method for class 'summary.DDL' print(x, ...)
## S3 method for class 'summary.DDL' print(x, ...)
x |
An object of class 'summary.DDL' |
... |
Ignored |
'summary' method for class 'DDL'
## S3 method for class 'DDL' summary(object, ...)
## S3 method for class 'DDL' summary(object, ...)
object |
An object of class 'DDL' |
... |
Ignored |
The function 'summary.DDL' returns a list of summary statistics of DDL given 'DDL'
index = 1 n=100 p=200 s=5 q=3 sigmaE=2 sigma=2 pert=1 H = pert*matrix(rnorm(n*q,mean=0,sd=1),n,q,byrow = TRUE) Gamma = matrix(rnorm(q*p,mean=0,sd=1),q,p,byrow = TRUE) #value of X independent from H E = matrix(rnorm(n*p,mean=0,sd=sigmaE),n,p,byrow = TRUE) #defined in eq. (2), high-dimensional measured covariates X = E + H %*% Gamma delta = matrix(rnorm(q*1,mean=0,sd=1),q,1,byrow = TRUE) #px1 matrix, creates beta with 1s in the first s entries and the remaining p-s as 0s beta = matrix(rep(c(1,0),times = c(s,p-s)),p,1,byrow = TRUE) #nx1 matrix with values of mean 0 and SD of sigma, error in Y independent of X nu = matrix(rnorm(n*1,mean=0,sd=sigma),n,1,byrow = TRUE) #eq. (1), the response of the Structural Equation Model Y = X %*% beta + H %*% delta + nu result = DDL(X, Y, index) summary(result)
index = 1 n=100 p=200 s=5 q=3 sigmaE=2 sigma=2 pert=1 H = pert*matrix(rnorm(n*q,mean=0,sd=1),n,q,byrow = TRUE) Gamma = matrix(rnorm(q*p,mean=0,sd=1),q,p,byrow = TRUE) #value of X independent from H E = matrix(rnorm(n*p,mean=0,sd=sigmaE),n,p,byrow = TRUE) #defined in eq. (2), high-dimensional measured covariates X = E + H %*% Gamma delta = matrix(rnorm(q*1,mean=0,sd=1),q,1,byrow = TRUE) #px1 matrix, creates beta with 1s in the first s entries and the remaining p-s as 0s beta = matrix(rep(c(1,0),times = c(s,p-s)),p,1,byrow = TRUE) #nx1 matrix with values of mean 0 and SD of sigma, error in Y independent of X nu = matrix(rnorm(n*1,mean=0,sd=sigma),n,1,byrow = TRUE) #eq. (1), the response of the Structural Equation Model Y = X %*% beta + H %*% delta + nu result = DDL(X, Y, index) summary(result)