Description Usage Arguments Details Value Author(s) References
This function estimates the average causal effects for randomized experiments with noncompliance and missing outcomes under the assumption of latent ignorability (Frangakis and Rubin, 1999). The models are based on Bayesian generalized linear models and are fitted using the Markov chain Monte Carlo algorithms. Various types of the outcome variables can be analyzed to estimate the IntentiontoTreat effect and Complier Average Causal Effect.
1 2 3 4 5 6 7 8 9  NoncompLI(formulae, Z, D, data = parent.frame(), n.draws = 5000,
param = TRUE, in.sample = FALSE, model.c = "probit",
model.o = "probit", model.r = "probit", tune.c = 0.01, tune.o = 0.01,
tune.r = 0.01, tune.v = 0.01, p.mean.c = 0, p.mean.o = 0,
p.mean.r = 0, p.prec.c = 0.001, p.prec.o = 0.001, p.prec.r = 0.001,
p.df.o = 10, p.scale.o = 1, p.shape.o = 1, mda.probit = TRUE,
coef.start.c = 0, coef.start.o = 0, tau.start.o = NULL,
coef.start.r = 0, var.start.o = 1, burnin = 0, thin = 0,
verbose = TRUE)

formulae 
A list of formulae where the first formula specifies the
(pretreatment) covariates in the outcome model (the latent compliance
covariate will be added automatically), the second formula specifies the
compliance model, and the third formula defines the covariate specification
for the model for missingdata mechanism (the latent compliance covariate
will be added automatically). For the outcome model, the formula should take
the twosided standard R 
Z 
A randomized encouragement variable, which should be a binary variable in the specified data frame. 
D 
A treatment variable, which should be a binary variable in the specified data frame. 
data 
A data frame which contains the variables that appear in the
model formulae ( 
n.draws 
The number of MCMC draws. The default is 
param 
A logical variable indicating whether the Monte Carlo draws of
the model parameters should be saved in the output object. The default is

in.sample 
A logical variable indicating whether or not the sample
average causal effect should be calculated using the observed potential
outcome for each unit. If it is set to 
model.c 
The model for compliance. Either 
model.o 
The model for outcome. The following five models are allowed:

model.r 
The model for (non)response. Either 
tune.c 
Tuning constants for fitting the compliance model. These
positive constants are used to tune the (randomwalk) MetropolisHastings
algorithm to fit the logit model. Use either a scalar or a vector of
constants whose length equals that of the coefficient vector. The default is

tune.o 
Tuning constants for fitting the outcome model. These positive
constants are used to tune the (randomwalk) MetropolisHastings algorithm
to fit logit, ordered probit, and negative binomial models. Use either a
scalar or a vector of constants whose length equals that of the coefficient
vector for logit and negative binomial models. For the ordered probit model,
use either a scalar or a vector of constants whose length equals that of
cutpoint parameters to be estimated. The default is 
tune.r 
Tuning constants for fitting the (non)response model. These
positive constants are used to tune the (randomwalk) MetropolisHastings
algorithm to fit the logit model. Use either a scalar or a vector of
constants whose length equals that of the coefficient vector. The default is

tune.v 
A scalar tuning constant for fitting the variance component of
the negative binomial (outcome) model. The default is 
p.mean.c 
Prior mean for the compliance model. It should be either a
scalar or a vector of appropriate length. The default is 
p.mean.o 
Prior mean for the outcome model. It should be either a
scalar or a vector of appropriate length. The default is 
p.mean.r 
Prior mean for the (non)response model. It should be either
a scalar or a vector of appropriate length. The default is 
p.prec.c 
Prior precision for the compliance model. It should be
either a positive scalar or a positive semidefinite matrix of appropriate
size. The default is 
p.prec.o 
Prior precision for the outcome model. It should be either a
positive scalar or a positive semidefinite matrix of appropriate size. The
default is 
p.prec.r 
Prior precision for the (non)response model. It should be
either a positive scalar or a positive semidefinite matrix of appropriate
size. The default is 
p.df.o 
A positive integer. Prior degrees of freedom parameter for the
inverse chisquare distribution in the gaussian and twopart (outcome) models.
The default is 
p.scale.o 
A positive scalar. Prior scale parameter for the inverse
chisquare distribution (for the variance) in the gaussian and twopart
(outcome) models. For the negative binomial (outcome) model, this is used
for the scale parameter of the inverse gamma distribution. The default is

p.shape.o 
A positive scalar. Prior shape for the inverse chisquare
distribution in the negative binomial (outcome) model. The default is

mda.probit 
A logical variable indicating whether to use marginal data
augmentation for probit models. The default is 
coef.start.c 
Starting values for coefficients of the compliance
model. It should be either a scalar or a vector of appropriate length. The
default is 
coef.start.o 
Starting values for coefficients of the outcome model.
It should be either a scalar or a vector of appropriate length. The default
is 
tau.start.o 
Starting values for thresholds of the ordered probit
(outcome) model. If it is set to 
coef.start.r 
Starting values for coefficients of the (non)response
model. It should be either a scalar or a vector of appropriate length. The
default is 
var.start.o 
A positive scalar starting value for the variance of the
gaussian, negative binomial, and twopart (outcome) models. The default is

burnin 
The number of initial burnins for the Markov chain. The
default is 
thin 
The size of thinning interval for the Markov chain. The default
is 
verbose 
A logical variable indicating whether additional progress
reports should be prited while running the code. The default is 
For the details of the model being fitted, see the references. Note that when alwaystakers exist we fit either two logistic or two probit models by first modeling whether a unit is a complier or a noncomplier, and then modeling whether a unit is an alwaystaker or a nevertaker for those who are classified as noncompliers.
An object of class NoncompLI
which contains the following
elements as a list:
call 
The matched call. 
Y 
The outcome variable. 
D 
The treatment variable. 
Z 
The (randomized) encouragement variable. 
R 
The response indicator variable for

A 
The indicator variable for (known) alwaystakers, i.e., the control units who received the treatment. 
C 
The indicator variable for (known) compliers, i.e., the encouraged units who received the treatment when there is no alwaystakers. 
Xo 
The matrix of covariates used for the outcome model. 
Xc 
The matrix of covariates used for the compliance model. 
Xr 
The matrix of covariates used for the (non)response model. 
n.draws 
The number of MCMC draws. 
QoI 
The Monte carlo draws of quantities of interest from their
posterior distributions. Quantities of interest include 
If param
is set to TRUE
, the
following elments are also included:
coefO 
The Monte carlo draws of coefficients of the outcome model from their posterior distribution. 
coefO1 
If 
coefC 
The Monte carlo draws of coefficients of the compliance model from their posterior distribution. 
coefA 
If alwaystakers exist, then this element contains the Monte carlo draws of coefficients of the compliance model for alwaystakers from their posterior distribution. 
coefR 
The Monte carlo draws of coefficients of the (non)response model from their posterior distribution. 
sig2 
The Monte carlo draws of the variance parameter for the gaussian, negative binomial, and twopart (outcome) models. 
Kosuke Imai, Department of Politics, Princeton University [email protected], http://imai.princeton.edu;
Frangakis, Constantine E. and Donald B. Rubin. (1999). “Addressing Complications of IntentiontoTreat Analysis in the Combined Presence of AllorNone Treatment Noncompliance and Subsequent Missing Outcomes.” Biometrika, Vol. 86, No. 2, pp. 365379.
Hirano, Keisuke, Guido W. Imbens, Donald B. Rubin, and XiaoHua Zhou. (2000). “Assessing the Effect of an Influenza Vaccine in an Encouragement Design.” Biostatistics, Vol. 1, No. 1, pp. 6988.
Barnard, John, Constantine E. Frangakis, Jennifer L. Hill, and Donald B. Rubin. (2003). “Principal Stratification Approach to Broken Randomized Experiments: A Case Study of School Choice Vouchers in New York (with Discussion)”, Journal of the American Statistical Association, Vol. 98, No. 462, pp299–311.
Horiuchi, Yusaku, Kosuke Imai, and Naoko Taniguchi (2007). “Designing and Analyzing Randomized Experiments: Application to a Japanese Election Survey Experiment.” American Journal of Political Science, Vol. 51, No. 3 (July), pp. 669687.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.