Perform Two-Stage Hard Thresholding method, which provides the robust inference of the treatment effect in the presence of invalid instrumental variables.
TSHT(
Y,
D,
Z,
X,
intercept = TRUE,
method = c("OLS", "DeLasso", "Fast.DeLasso"),
voting = c("MaxClique", "MP", "Conservative"),
robust = TRUE,
alpha = 0.05,
tuning.1st = NULL,
tuning.2nd = NULL
)TSHT returns an object of class "TSHT", which is a list containing the following components:
betaHatThe estimate of treatment effect.
beta.sdHatThe estimated standard error of betaHat.
ciThe 1-alpha confidence interval for beta.
SHatThe set of selected relevant IVs.
VHatThe set of selected relevant and valid IVs.
voting.matThe voting matrix.
checkThe indicator that the majority rule is satisfied.
The outcome observation, a vector of length \(n\).
The treatment observation, a vector of length \(n\).
The instrument observation of dimension \(n \times p_z\).
The covariates observation of dimension \(n \times p_x\).
Whether the intercept is included. (default = TRUE)
The method used to estimate the reduced form parameters. "OLS" stands for ordinary least squares, "DeLasso" stands for the debiased Lasso estimator, and "Fast.DeLasso" stands for the debiased Lasso estimator with fast algorithm. (default = "OLS")
The voting option used to estimate valid IVs. 'MP' stands for majority and plurality voting, 'MaxClique' stands for finding maximal clique in the IV voting matrix, and 'Conservative' stands for conservative voting procedure. Conservative voting is used to get an initial estimator of valid IVs in the Searching-Sampling method. (default= 'MaxClique').
If TRUE, the method is robust to heteroskedastic errors. If FALSE, the method assumes homoskedastic errors. (default = TRUE)
The significance level for the confidence interval. (default = 0.05)
The tuning parameter used in the 1st stage to select relevant instruments. If NULL, it will be generated data-dependently, see Details. (default=NULL)
The tuning parameter used in the 2nd stage to select valid instruments. If NULL, it will be generated data-dependently, see Details. (default=NULL)
When robust = TRUE, the method will be input as ’OLS’.
When voting = MaxClique and there are multiple maximum cliques, betaHat,beta.sdHat,ci, and VHat will be list objects
where each element of list corresponds to each maximum clique.
As for tuning parameter in the 1st stage and 2nd stage, if do not specify, for method "OLS" we adopt \(\sqrt{\log n}\) for both tuning parameters, and for other methods
we adopt \(\max{(\sqrt{2.01 \log p_z}, \sqrt{\log n})}\) for both tuning parameters.
Guo, Z., Kang, H., Tony Cai, T. and Small, D.S. (2018), Confidence intervals for causal effects with invalid instruments by using two-stage hard thresholding with voting, J. R. Stat. Soc. B, 80: 793-815.
data("lineardata")
Y <- lineardata[,"Y"]
D <- lineardata[,"D"]
Z <- as.matrix(lineardata[,c("Z.1","Z.2","Z.3","Z.4","Z.5","Z.6","Z.7","Z.8")])
X <- as.matrix(lineardata[,c("age","sex")])
TSHT.model <- TSHT(Y=Y,D=D,Z=Z,X=X)
summary(TSHT.model)
Run the code above in your browser using DataLab