moderndive | R Documentation |
Datasets and wrapper functions for tidyverse-friendly introductory linear regression, used in "Statistical Inference via Data Science: A ModernDive into R and the tidyverse" available at https://moderndive.com/.
library(moderndive) # Fit regression model: mpg_model <- lm(mpg ~ hp, data = mtcars) # Regression tables: get_regression_table(mpg_model) # Information on each point in a regression: get_regression_points(mpg_model) # Regression summaries get_regression_summaries(mpg_model) # Plotting parallel slopes models library(ggplot2) ggplot(evals, aes(x = age, y = score, color = ethnicity)) + geom_point() + geom_parallel_slopes(se = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.