Linear Models with R

Emphasis on Basics of Multiple Regression
To accompany Introductory Statistics Classes at the University at Albany.

Author

Bruce Dudek

Published

February 7, 2026

Preface

Linear Modeling, in it’s most rudimentary form, is also termed multiple regression. This document provides a template for execution of most of the basic analyses associated with this methodology. It is intended for students of the APSY510/511 introductory statistics sequence at the University at Albany, but can be a standalone document for others learning to use R for data analysis. The level of the document is targeted to an audience of researchers in training who are simultaneously learning linear modeling/regression theory and R programming. Some introduction to regression modeling with the lm function previously had been covered for simple regression and can be found in an accompanying document. The current document extends that work to a model with two IVs as an extensive illustration and then briefly covers models with more than two IVs.

Initially, the document works through extensive details of modeling with two Independent Variables to keep the conceptual development simple. The data set used is one already covered extensively with manual computations and SPSS implementation. Some extension to models with more than two IVs is also included in the “extensions” chapter.

The document emphasizes models where all variables are numeric/quantitative. Categorical IVs are covered in later documents, although one brief illustration is included in this document.

This book/monograph was created with Quarto, and was built largely using rmarkdown (Allaire et al., 2020) and knitr (Xie, 2015). RStudio (RStudio Team, 2015) was used for all writing and programming.