getObs: Calculate summary statistics of observables

Description Usage Arguments Value Examples

Description

This function calculates summary statistics for later use in the partial identification exercise for a binary, mis-measured, endogenous regressor based on a binary instrument that may itsef be endogenous.

Usage

1
getObs(y_name, T_name, z_name, controls = NULL, data)

Arguments

y_name

Name of the outcome variable.

T_name

Name of the potentially endogenous and mis-measured binary treatment variable.

z_name

Name of the potentially endogenous binary instrument.

controls

Vector of names of exogenous control regressors.

data

Name of dataframe whose columns contain the data for the outcome, regressor, instrument, and controls.

Value

A list of summary statistics: probabilities, conditional means and variances, etc., in notation corresponding to the paper.

Examples

1
2
3
4
5
6
7
8
9
AngristControls <- c("age", "svy", "sex2", "phone", "hsvisit",
                     "d1995", "djamundi", "dmonth1", "dmonth2",
                     "dmonth3", "dmonth4", "dmonth5", "dmonth6", "dmonth7",
                     "dmonth8", "dmonth9", "dmonth10", "dmonth11",
                     "strata1", "strata2", "strata3", "strata4", "strata5")
AngristY <- "totalRepeats"
AngristT <- "usesch"
AngristZ <- "vouch0"
getObs(AngristY, AngristT, AngristZ, AngristControls, angrist)

fditraglia/binivdoctr documentation built on May 16, 2019, 12:10 p.m.