Learn R Programming

localIV (version 0.2.0)

eval_mte_tilde: Evaluate Marginal Treatment Effects Projected onto the Propensity Score

Description

eval_mte_tilde is a function that evaluates marginal treatment effects projected onto the estimated propensity score (Zhou and Xie 2019). The projection is done via the function gam with default parameters.

Usage

eval_mte_tilde(object, p, u)

Arguments

object

An object of class mte returned by mte.

p

Value(s) of the propensity score \(p\) at which MTE_tilde(p, u) is evaluated.

u

Value(s) of the latent resistance \(u\) at which MTE_tilde(p, u) is evaluated.

Value

A list of two elements.

mte_tilde

Estimates of MTE_tilde(p, u)

model

Fitted model of \(X'(\beta_1 - \beta_0)\) as a function of the (estimated) propensity score

References

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

Examples

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

x <- seq(0.05, 0.95, 0.05)
mte_tilde_p <- eval_mte_tilde(mte_fit, p = x, u = 0.5)$mte_tilde
mte_tilde_u <- eval_mte_tilde(mte_fit, p = 0.5, u = x)$mte_tilde
mprte_tilde_p <- eval_mte_tilde(mte_fit, p = x, u = x)$mte_tilde

out <- cbind(mte_tilde_p, mte_tilde_u, mprte_tilde_p)
matplot(x = x, y = out, type = "l")

# }

Run the code above in your browser using DataLab