# NOT RUN {
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)
}
# }
Run the code above in your browser using DataLab