moderndive: moderndive - Tidyverse-Friendly Introductory Linear...

moderndiveR Documentation

moderndive - Tidyverse-Friendly Introductory Linear Regression

Description

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/.

Author(s)

Maintainer: Albert Y. Kim albert.ys.kim@gmail.com (ORCID)

Authors:

Other contributors:

See Also

Useful links:

Examples

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)

moderndive documentation built on Sept. 11, 2024, 9:26 p.m.