Description Usage Arguments Examples
This function uses ggplot2 to create a multi-scatterplot with a line of best fit and a loess smoother overlaid, based on two existing linear models. It is often discouraged in strong terms to do this, so this library requires that the x axes in both models are identical before proceeding. With identical x axes, I don't see the problem in viewing two dependent variables together.
1 2 | mfs_scatter_from_models(model1, model2, xlab = "", y1lab = "", y2lab = "",
title = "", color_scheme_1 = "bluish", color_scheme_2 = "reddish")
|
model1 |
A generalized linear model, returned from glm() |
model2 |
A generalized linear model, returned from glm() |
xlab |
Optionally, provide a label for the x axis |
y1lab |
Optionally, provide a label for the first y axis |
y2lab |
Optionally, provide a label for the second y axis |
title |
Optionally, provide a title to override the default |
scheme1 |
override the default "bluish" colors for plotting model1 |
scheme2 |
override the default "reddish" colors for plotting model2 |
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.