Learn R Programming

ivtools (version 1.0.0)

bounds: Bounds for the marginal causal risk difference in instrumental variables scenarios

Description

bounds computes non-parametric bounds for the marginal causal risk difference in instrumental variables scenarios with binary variables. Let \(Y\), \(X\), and \(Z\) be the binary outcome, exposure, and instrument, respectively. Let \(p(Y_x=1)\) be the counterfactual probability of the outcome, had all subjects been exposed to level \(x\). bounds computes bounds for the marginal causal risk difference \(p(Y_1=1)-p(Y_0=1)\), as well as bounds for the counterfactuals probabilities \(p(Y_1=1)\) and \(p(Y_0=1)\) separately.

Usage

bounds(data, Z, X, Y)

Arguments

data

either a data frame containing the variables in the model, or a named vector (p00.0,...,p11.1) containing the eight probabilities \((p(Y=0,X=0|Z=0),...,p(Y=1,X=1|Z=1))\).

Z

a string containing the name of the instrument \(Z\) in data. Not specified if data is a vector of probabilities.

X

a string containing the name of the exposure \(X\) in data. Not specified if data is a vector of probabilities.

Y

a string containing the name of the outcome \(Y\) in data. Not specified if data is a vector of probabilities.

Value

An object of class "bounds" is a list containing

p0

a vector containing the lower and upper bounds for \(p(Y_0=1)\).

p1

a vector containing the lower and upper bounds for \(p(Y_1=1)\).

RD

a vector containing the lower and upper bounds for \(p(Y_1=1)-p(Y_0=1)\).

Details

bounds uses linear programming techniques to bound the marginal causal risk difference. For details, see Balke and Pearl (2009).

References

Balke, A. and Pearl, J. (1997). Bounds on treatment effects from studies with imperfect compliance. Journal of the American Statistical Association 92(439), 1171-1176.

Examples

Run this code
# NOT RUN {
##Vitamin A example from Balke and Pearl (1997).
n0 <- 74+11514
n1 <- 34+12+2385+9663
p <- c(74/n0, 34/n1, 0, 12/n1, 11514/n0, 2385/n1, 0, 9663/n1)
names(p) <- c("p00.0", "p00.1", "p01.0", "p01.1", 
  "p10.0", "p10.1", "p11.0", "p11.1") 
bounds(data=p)

# }

Run the code above in your browser using DataLab