ivdesc: Profiling compliers and non-compliers for instrumental...

Description Usage Arguments Details Value References See Also Examples

View source: R/ivdesc.R

Description

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

Usage

1
2
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, analytical standard errors are calculated for the mean of the whole sample as well as the never-taker and always-taker subpopulation. For the complier subpopulation no analytical estimator for the standard error is available.

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

Moritz Marbach and Dominik Hangartner. (2019). Profiling Compliers and Non-compliers for Instrumental Variable Analysis. Political Analysis (forthcoming).

See Also

ivreg

Examples

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

 
 
 

ivdesc documentation built on Oct. 30, 2019, 11:41 a.m.