mte_at {localIV} | R Documentation |
Evaluate Marginal Treatment Effects from a Fitted MTE Model.
Description
mte_at
evaluates marginal treatment effects at different
values of the latent resistance u
with a given X=x
.
Usage
mte_at(x = NULL, u, model)
Arguments
x |
Values of the pretreatment covariates at which |
u |
A numeric vector. Values of the latent resistance |
model |
A fitted MTE model returned by |
Value
mte_at
returns a data frame.
u |
input values of |
x_comp |
the x-component of the estimated |
u_comp |
the u-component of the estimated |
value |
estimated values of |
Examples
mod <- mte(selection = d ~ x + z, outcome = y ~ x, data = toydata)
mte_vals <- mte_at(u = seq(0.05, 0.95, 0.1), model = mod)
if(require("ggplot2")){
ggplot(mte_vals, aes(x = u, y = value)) +
geom_line(size = 1) +
xlab("Latent Resistance U") +
ylab("Estimates of MTE at Mean Values of X") +
theme_minimal(base_size = 14)
}