SpotIV {controlfunctionIV}R Documentation

SpotIV method for causal inference in semi-parametric outcome model

Description

Perform causal inference in the semi-parametric outcome model with possibly invalid IVs.

Usage

SpotIV(
  Y,
  D,
  Z,
  X = NULL,
  intercept = TRUE,
  invalid = TRUE,
  d1,
  d2,
  w0,
  M.est = TRUE,
  M = 2,
  bs.Niter = 40,
  bw = 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)

invalid

If TRUE, the method is robust to the presence of possibly invalid IVs; If FALSE, the method assumes all IVs to be valid. (default = TRUE)

d1

A treatment value for computing CATE(d1,d2|w0).

d2

A treatment value for computing CATE(d1,d2|w0).

w0

A vector of the instruments and baseline covariates for computing CATE(d1,d2|w0).

M.est

If TRUE, M is estimated based on BIC, otherwise M is specified by input value of M. (default = TRUE)

M

The dimension of indices in the outcome model, from 1 to 3. (default = 2)

bs.Niter

The bootstrap resampling size for constructing the confidence interval.

bw

A (M+1) by 1 vector bandwidth specification. (default = NULL)

Value

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

betaHat

The estimate of the model parameter in front of the treatment.

cateHat

The estimate of CATE(d1,d2|w0).

cate.sdHat

The estimated standard error of cateHat.

SHat

The set of relevant IVs.

VHat

The set of relevant and valid IVs.

Maj.pass

The indicator that the majority rule is satisfied.

References

Li, S., Guo, Z. (2020), Causal Inference for Nonlinear Outcome Models with Possibly Invalid Instrumental Variables, Preprint arXiv:2010.09922.

Examples


data("nonlineardata")
Y <- nonlineardata[,"CVD"]
D <- nonlineardata[,"bmi"]
Z <- as.matrix(nonlineardata[,c("Z.1","Z.2","Z.3","Z.4")])
X <- as.matrix(nonlineardata[,c("age","sex")])
d1 <- median(D)+1
d2 <- median(D)
w0 <- c(rep(0,4), 30, 1)
SpotIV.model <- SpotIV(Y,D,Z,X,invalid = TRUE,d1 =d1, d2 = d2,w0 = w0)
summary(SpotIV.model)



[Package controlfunctionIV version 0.1.1 Index]