inferen: Provide CI of individual coefficient of high-dimensional...

Description Usage Arguments Value Author(s) References Examples

View source: R/inferen.R

Description

This function provides the confidence intevals of individual coefficient of high-dimensional quantile regression by a regularized projection score method for estimating treatment effects. One-step estimation procedure can speed up computation, and the Bootstrap method can narrow the length of CI.

Usage

1
2
inferen(y,x,z,tau,method="OneStep",pen="glasso",eps=1e-6,
        sim.level=0.85,iter.num=100,RCV=F,K=1,weights=NULL,B=1000)

Arguments

y

The response, a vector of size n

x

The treatment effects, a matrix with dimension n\times p

z

The confounders a matrix with dimension n\times q

tau

The given quantile, a scale in the unit inteval

method

The method including "OneStep", "Iterative". "OneStep" denotes one-step method ( Feng et al. 2019); "Iterative" denotes that the iteration stops when algorithm conveges. Default is "OneStep".

pen

The penalty including "glasso" and "lasso". "glasso" denotes the grouped lasso that is used in the regression of treatment effect on confounders; "lasso" denotes the lasso. Default is "glasso".

eps

The perturbation when the proposed algorithm is used. Default is epsilon=1e-6.

sim.level

The length of tuning parameter α which is selected automatically. Default is 50.

iter.num

The number of iteration if method="Iterative" is used. Default is 100.

RCV

Use refitted cross validation method and wild bootstrap to estimate the asymptotic covariance matrix. Default is False.

K

The number of repeated RCV. Default is 1.

weights

The weights used for wild bootstrap; if not specified (=NULL). Default is NULL.

B

The size for bootstrap. Default is 1000.

Value

ests

Estimator of β. It is a list.

covs

Covariance matrix of β. It is a d\times d-matrix.

Author(s)

Chao Cheng, Xingdong Feng, Jian Huang and Xu Liu (liu.xu@sufe.edu.cn)

References

Cheng, C., Feng, X., Huang, J. and Liu, X. (2020). Regularized projection score estimation of treatment effects in high-dimensional quantile regression. Manuscript.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
library(pqr)

n <- 50
d <- 3
s <- 3
p <- 20
alpha <- 0.95
beta <- rep(3,d)
eta <- c(rep(3,s),numeric(p-s))
x <- matrix(rnorm(n*d),n,d)
z <- matrix(rnorm(n*(p-1)),n,p-1)
y <- x%*%beta + cbind(1,z)%*%eta + rnorm(n)
fit <- inferen(y,x,z,tau=0.5)
ests <- fit$ests
est.coef <- ests$coef
boot.var <- diag(fit$cov)
lbounds <- ests$coef - qnorm((1+alpha)/2)*sqrt(boot.var)
ubounds <- ests$coef + qnorm((1+alpha)/2)*sqrt(boot.var)
counts <- ifelse(lbounds<beta&beta<ubounds,1,0)

xliusufe/pqr documentation built on Feb. 5, 2020, 3:06 a.m.