Description Usage Arguments Details Value References See Also Examples
Estimates the mean and variance of a covariate for the complier, nevertaker and alwaystaker subpopulation.
1 2 3 4 5 6 7 8 9 10 
X 
vector with numeric covariate 
D 
vector with binary treatment 
Z 
vector with binary instrument 
variance 
Calculate the variance of the covariate for each subgroup? 
boot 
Replace all standard errors with bootstrap standard errors? 
bootn 
number of bootstraps (ignored if 
balance 
Run balance test? 
... 
additional arguments to be passed to 
This function estimates the mean and the associated standard error of X
for the complier, nevertaker and alwaystaker subpopulation within a sample where some, but not all, units are encouraged by instrument Z
to take the treatment D
.
Observations with missing values in either X
, D
, or Z
are droppped (listwise deletion).
Onesided noncompliance is supported. The mean for the always/nevertaker subpopulation will only be computed if there are at least two observed units in these subpopulations.
If boot=FALSE
, standard errors based on asymptotic theory are estimated.
The balance test is a ttest allowing for unequal variances.
Returns a object ivdesc
with estimates for each subgroup (co
: complier, nt
: nevertaker, at
: alwaystaker) and the full sample:
mu
and mu_se
: Mean of X
and standard error
pi
and pi_se
: Proportion of each subgroup in the sample and standard error
var
: Variance of X
(if variance=TRUE
)
Can be coerced to a proper data.frame
using as.data.frame
.
M. Marbach and D. Hangartner. 2020. Profiling Compliers and Noncompliers for Instrumental Variable Analysis. Political Analysis, 28(3), 435444.
D. Hangartner, M. Marbach, L. Henckel, M. H. Maathuis, R. R. Kelz, and L. Keele. 2021. Profiling Compliers in Instrumental Variables Designs. Available at arXiv: https://arxiv.org/abs/2103.06328.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 
# Example 1: Albertson/Lawrence (2009)
# see Marbach/Hangartner (2019) for details/discussion
library(icsw)
data(FoxDebate)
with(FoxDebate, ivdesc(X=readnews,D=watchpro,Z=conditn) )
# Example 2: JTPA Data
library(haven)
jtpa < read_dta("http://fmwww.bc.edu/repec/bocode/j/jtpa.dta")
with(jtpa, ivdesc(age, training, assignmt, bootn=500))
with(jtpa, ivdesc(hispanic, training, assignmt, boot=FALSE))

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.