ieff.4 <- ie(example1, allocation1 = .4)
x <- ieff.4$alpha2
y <- as.numeric(ieff.4$estimate)
u <- as.numeric(ieff.4$conf.high)
l <- as.numeric(ieff.4$conf.low)
plot(c(min(x), max(x)),c(-.15, .25), type = 'n',
xlab = expression(alpha * "'"),
ylab = expression(widehat(IE) * "(" * 0.4 * "," * alpha * "'" * ")"))
polygon(c(x, rev(x)), c(u, rev(l)), col = 'skyblue', border = NA)
lines(x, y, cex = 2)
ieff <- subset(example1$estimates, effect == 'indirect')
x <- sort(unique(ieff$alpha1))
y <- sort(unique(ieff$alpha2))
z <- xtabs(as.numeric(estimate) ~ alpha1 + alpha2, data= ieff)
contour(x, y, z,
xlab = expression(alpha), ylab = expression(alpha * "'"))