library(shellpipes)
library(vareffects); varefftheme()
library(ggplot2)
library(dplyr)
library(ggthemes)
loadEnvironments()
startGraphics()
## Isolated with CIs (zero-anchored)
quants <- seq(0,1,length.out=100)
x2_focal <- quantile(justify_sim_df$x2, quants, names=FALSE)
justify_center_anchored <- varpred(justify_mod, "x2", at=list(x2=x2_focal), modelname="center-anchored")
justify_zero_anchored <- varpred(justify_mod, "x2", at=list(x2=x2_focal), isolate.value=0, modelname="zero-anchored")
## Combined
veff_combined_plot <- (combinevarpred(list(justify_center_anchored, justify_zero_anchored), plotit=TRUE)
+ labs(x="x2", y="y")
+ scale_colour_colorblind()
+ scale_linetype_manual(values=c(1,1))
+ theme(legend.position="bottom")
+ labs(colour="Method", linetype="Method")
)
teeGG(veff_combined_plot, desc="combined")
saveVars(veff_combined_plot)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.