Learn R Programming

localIV (version 0.1.0)

mte: Estimation of Marginal Treatment Effects (MTE)

Description

mte is a function that estimates MTE using either local instrumental variables (local IV) or a normal selection model (Heckman, Urzua, Vytlacil 2006). The user supplies a formula for the treatment selection model, a formula for the outcome model, and a data frame containing the variables. The function returns an object of class mte. Observations which contain NA (either in selection or outcome) are removed.

Usage

mte(selection, outcome, data, method = c("localIV", "normal"),
  bw = 0.25)

Arguments

selection

A formula representing the selection equation.

outcome

A formula representing the outcome equation where the left hand side is the observed outcome and the right hand side includes predictors of both potential outcomes.

data

An optional data frame, list, or environment containing the variables in the model.

method

How to estimate the model: either "localIV" for local instrumental variables or "normal" for a normal selection model.

bw

Bandwidth used for the local polynomial regression in the local IV approach. Default is 0.25.

Value

An object of class mte.

mte

Fitted MTE function, taking two arguments, x for a vector of observed covariates and u for the latent resistance.

mte_tilde

Fitted MTE function, taking two arguments, p for the propensity score and u for the latent resistance. See Zhou and Xie (Forthcoming) for a definition.

mtr

Fitted marginal treatment response (MTR) function, taking three arguments, x for a vector of observed covariates, u for the latent resistance, and d for treatment status (1 or 2). Available only when method = "normal". See Mogstad, Santos, and Torgovitsky (Forthcoming) for a definition.

mtr_tilde

Fitted marginal treatment response (MTR) function, taking three arguments, p for the propensity score, u for the latent resistance, and d for treatment status (1 or 2). Available only when method = "normal".

coefs

A list of fitted coefficients: gamma for the treatment selection model (a probit model), beta1 for the baseline outcome, beta2 for the treated outcome, and theta1 and theta2 for the error covariances when method = "normal".

mte_mat

An N-by-100 matrix representing estimated MTE for all units, where N is the sample size. Each row represents a unit and each column represents a value of the normalized latent resistance, which runs from 0.005 to 0.995 with a step size of 0.01.

ps

Estimated propensity scores.

ps_model

The propensity score model, an object of class glm if method = "localIV", or an object of class selection if method = "normal".

Z

The model matrix for the treatment selection equation.

D

The response vector for the treatment selection equation.

X

The model matrix for the outcome equation.

Y

The observed outcome.

call

The matched call.

References

Heckman, James J., Sergio Urzua, and Edward Vytlacil. 2006. "Understanding Instrumental Variables in Models with Essential Heterogeneity." The Review of Economics and Statistics 88:389-432.

Zhou, Xiang and Yu Xie. Forthcoming. "Marginal Treatment Effects from A Propensity Score Perspective." Journal of Political Economy.

Mogstad, Santos, and Torgovitsky. Forthcoming. "Using Instrumental Variables for Inference About Policy Relevant Treatment Effects." Econometrica.

Examples

Run this code
# NOT RUN {
mte_fit <- mte(selection = d ~ x + z, outcome = y ~ x,
  method = "localIV", data = toydata)
summary(mte_fit$ps_model)

op <- par(mfrow = c(1, 3))

# heterogeneous treatment effects by the propensity score
with(mte_fit, curve(mte_tilde(p = x, u = 0.5), 0, 1))

# heterogeneous treatment effects by the latent resistance
with(mte_fit, curve(mte_tilde(p = 0.5, u = x), 0, 1))

# heterogeneous treatment effects among marginal entrants
with(mte_fit, curve(mte_tilde(p = x, u = x), 0, 1))

par(op)

# }

Run the code above in your browser using DataLab