ivdesc {ivdesc}R Documentation

Profiling compliers and non-compliers for instrumental variable analysis

Description

Estimates the mean and variance of a covariate for the complier, never-taker and always-taker subpopulation.

Usage

ivdesc(
  X,
  D,
  Z,
  variance = FALSE,
  boot = TRUE,
  bootn = 1000,
  balance = TRUE,
  ...
)

Arguments

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 boot=FALSE )

balance

Run balance test?

...

additional arguments to be passed to ivdesc_all

Details

This function estimates the mean and the associated standard error of X for the complier, never-taker and always-taker 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).

One-sided noncompliance is supported. The mean for the always-/never-taker 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 t-test allowing for unequal variances.

Value

Returns a object ivdesc with estimates for each subgroup (co: complier, nt: never-taker, at : always-taker) and the full sample:

Can be coerced to a proper data.frame using as.data.frame.

References

M. Marbach and D. Hangartner. 2020. Profiling Compliers and Non-compliers for Instrumental Variable Analysis. Political Analysis, 28(3), 435-444.

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.

See Also

ivreg

Examples

 

 # 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))

 
 
 



[Package ivdesc version 1.1.1 Index]