SearchingSampling {RobustIV}R Documentation

Searching-Sampling

Description

Construct Searching and Sampling confidence intervals for the causal effect, which provides the robust inference of the treatment effect in the presence of invalid instrumental variables in both low-dimensional and high-dimensional settings. It is robust to the mistakes in separating valid and invalid instruments.

Usage

SearchingSampling(
  Y,
  D,
  Z,
  X = NULL,
  intercept = TRUE,
  method = c("OLS", "DeLasso", "Fast.DeLasso"),
  robust = TRUE,
  Sampling = TRUE,
  alpha = 0.05,
  CI.init = NULL,
  a = 0.6,
  rho = NULL,
  M = 1000,
  prop = 0.1,
  filtering = TRUE,
  tuning.1st = NULL,
  tuning.2nd = NULL
)

Arguments

Y

The outcome observation, a vector of length n.

D

The treatment observation, a vector of length n.

Z

The instrument observation of dimension n \times p_z.

X

The covariates observation of dimension n \times p_x.

intercept

Whether the intercept is included. (default = TRUE)

method

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")

robust

If TRUE, the method is robust to heteroskedastic errors. If FALSE, the method assumes homoskedastic errors. (default = TRUE)

Sampling

If TRUE, use the proposed sampling method; else use the proposed searching method. (default=TRUE)

alpha

The significance level (default=0.05)

CI.init

An initial range for beta. If NULL, it will be generated automatically. (default=NULL)

a

The grid size for constructing beta grids. (default=0.6)

rho

The shrinkage parameter for the sampling method. (default=NULL)

M

The resampling size for the sampling method. (default = 1000)

prop

The proportion of non-empty intervals used for the sampling method. (default=0.1)

filtering

Filtering the resampled data or not. (default=TRUE)

tuning.1st

The tuning parameter used in the 1st stage to select relevant instruments. If NULL, it will be generated data-dependently, see Details. (default=NULL)

tuning.2nd

The tuning parameter used in the 2nd stage to select valid instruments. If NULL, it will be generated data-dependently, see Details. (default=NULL)

Details

When robust = TRUE, the method will be input as ’OLS’. For rho, M, prop, and filtering, they are required only for Sampling = TRUE. 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.

Value

SearchingSampling returns an object of class "SS", which is a list containing the following components:

ci

1-alpha confidence interval for beta.

SHat

The set of selected relevant IVs.

VHat

The initial set of selected relevant and valid IVs.

check

The indicator that the plurality rule is satisfied.

References

Guo, Z. (2021), Causal Inference with Invalid Instruments: Post-selection Problems and A Solution Using Searching and Sampling, Preprint arXiv:2104.06911.

Examples


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")])
Searching.model <- SearchingSampling(Y,D,Z,X, Sampling = FALSE)
summary(Searching.model)
Sampling.model <- SearchingSampling(Y,D,Z,X)
summary(Sampling.model)



[Package RobustIV version 0.2.5 Index]