factiv
is an R package to estimate causal effects in
factorial experiments with noncompliance on multiple factors. It
implements the methodology of Blackwell
(2017) and Blackwell
and Pashley (2020).
To install the package, you can use the remotes
package:
remotes::install_github("mattblackwell/factiv")
There are two main functions in the package,
iv_factorial
, which performs superpopulation-based
inference, and iv_finite_factorial
, which performs
finite-population inference for the factorial effects using the Fieller
method described in Blackwell
and Pashley (2020). You can use these functions in the following
manner:
library(factiv)
data(newhaven)
<- iv_factorial(turnout_98 ~ inperson + phone | inperson_rand +
superpop data = newhaven)
phone_rand,
<- iv_finite_factorial(formula = turnout_98 ~ inperson + phone |
finite + phone_rand, data = newhaven) inperson_rand