Take a moderndive into introductory linear regression with R
Albert Y. Kim, Chester Ismay, Max Kühn · Journal of Open Source Education · 2021
We present the moderndive R package of datasets and functions for tidyverse-friendly introductory linear regression (Wickham, Averick, et al., 2019).These tools leverage the well-developed tidyverse and broom packages to facilitate 1) working with regression tables that include confidence intervals, 2) accessing regression outputs on an observation level (e.g.fitted/predicted values and residuals), 3) inspecting scalar summaries of regression fit (e.g.R 2 , R 2 adj , and mean squared error), and 4) visualizing parallel slopes regression models using ggplot2-like syntax (Robinson & Hayes, 2019; Wickham, Chang, et al., 2019).This R package is designed to supplement the book "Statistical Inference via Data Science: A ModernDive into R and the Tidyverse" (Ismay & Kim, 2019).Note that the book is also available online at https://moderndive.com and is referred to as "ModernDive" for short. Statement of NeedLinear regression has long been a staple of introductory statistics courses.While the curricula of introductory statistics courses has much evolved of late, the overall importance of regression remains the same (American Statistical Association Undergraduate Guidelines Workgroup, 2016).Furthermore, while the use of the R statistical programming language for statistical analysis is not new, recent developments such as the tidyverse suite of packages have made statistical computation with R accessible to a broader audience (Wickham, Averick, et al., 2019).We go one step further by leveraging the tidyverse and the broom packages to make linear regression accessible to students taking an introductory statistics course (Robinson & Hayes, 2019).Such students are likely to be new to statistical computation with R; we designed moderndive with these students in mind.