Learn R Programming

localIV (version 0.2.0)

eval_mte: Evaluate Marginal Treatment Effects from a Fitted MTE Model.

Description

eval_mte is a function that evaluates marginal treatment effects at any combination of covariates x and latent resistance u from a fitted mte object. Note that the estimation may involve substantial extrapolation when the propensity score has a limited support.

Usage

eval_mte(object, x = colMeans(object$X)[-1], u)

Arguments

object

An object of class mte returned by mte.

x

A set of pretreatment covariates at which MTE(x, u) is evaluated. Default is the sample means.

u

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

Value

Estimates of MTE(x, u)

Examples

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

u <- seq(0.05, 0.95, 0.05)
mte_u <- eval_mte(mte_fit, u = u)
plot(mte_u ~ u, type = "b")

# }

Run the code above in your browser using DataLab