# Fit example models
data(iris)
m1 <- lm(Sepal.Length ~ Petal.Length, iris)
m2 <- lm(Sepal.Length ~ Petal.Length + Petal.Width, iris)
# Plot one model
plotEst(m2)
# Plot two models with default model labels
plotEst(m1, m2)
# Plot two models with custom model labels (simple)
plotEst(model1 = m1, model2 = m2)
# Plot two models with custom model labels (with spacing)
plotEst(`Simple model` = m1, `Full petal model` = m2)
# Plot two models without intercept
plotEst(m1, m2, intercept = FALSE)
# Plot two models with custom parameter subset
plotEst(m1, m2, par = c("Petal.Length"))
# Plot two models with custom color scale given by color names
plotEst(m1, m2, colors = c("red", "blue"))
# Plot two models with custom color scale given by color hex codes
# note: only the first colors are used as there are more
# colors than models
plotEst(m1, m2, colors = c("#CC6666", "#9999CC", "#66CC99"))
Run the code above in your browser using DataLab