modelDependence: Compute the Athey-Imbens measure of sensitivity to model...

Description Usage Arguments References Examples

View source: R/modelDependence.R

Description

modelDependence() is used to compute the Athey-Imbens measure of sensitivity to model specification or to estimate the range of possible treatment effect estimates by extreme bounds. If a base.form is given, the Athey-Imbens estimates are calculated. To use extreme bounds, give either model.dependence.ests or specifictions.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
modelDependence(dataset,
         treatment,
         outcome = NULL,
         covariates = NULL,
         model.dependence.ests = NULL,
         verbose = TRUE,
         ratio = 'fixed',
         specifications = NULL,
         base.form = NULL,
         cutpoints = NULL,
         median = TRUE,
         seed = 02138)

Arguments

dataset

A data frame containing the variables in the model.

treatment

The treatment (quantity of interest). The measure of model dependence is with respect to estimates of this quantity. Must be in base.form.

outcome

The outcome variable.

covariates

A vector of the names of covariates necessary to perform the extreme bounds (treatment, outcome, and control variables).

model.dependence.ests

For extreme bounds, the number of specifications to estimate.

base.form

The base formula that is to be evaluated.

verbose

If TRUE, additional information is printed.

seed

Seed for the random number generator.

cutpoints

A list where the keys are variables names and the values are cutpoints. If specified, cutpoints for these variables will not be estimated. Otherwise, cutpoints are estimated with segmented regression.

median

If TRUE, the cutpoint is set at the median. If false, the cutpoint is estimated with segmeted (piecewise) regression.

ratio

Either "fixed" or "variable". If fixed, covariates are not reweighted according to their matches during the extreme bounds procedure. If variable, they are reweighted.

specifications

A vector of model formulas to be used in the extreme bounds procedure. If not supplied, they are drawn from all possible specifications using up to third degree polynomials and double interactions.

References

Athey, Susan, and Guido W. Imbens. "A Measure of Robustness to Misspecification." (2014).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data(lalonde)

treatment <- 'treat'
base.form <- as.formula('re78 ~ treat + age + education
                         + black + hispanic + married +
                         nodegree + re74 + re75')

md <- modelDependence(dataset = lalonde, treatment = treatment,
                      base.form = base.form,
                      cutpoints = list('age' = mean(lalonde$age)))
print(md)

ChristopherLucas/MatchingFrontier documentation built on June 10, 2020, 6:01 p.m.