---
title: "How does R fit a linear model?"
author: "Matthew Whalen"
date: "2021-04-16T16:55:15Z"
tags: [Statistics]
link: "https://bookdown.org/mrwhalen/lm_deep_dive2/"
length_weight: "2.9%"
pinned: false
---

What happens when you run lm(y ~ x1 + x2) [...] This book is the product of my goal to answer the question ‘How does R fit a linear model using the lm function?’ A seemingly simple question based on one of the most humble formulas in all of statistics led me down a rabbit hole of math and programming I never expected. The goal of writing this is for my own etification, but also to provide a thorough walkthrough so that R-users at all levels of math and programming can have a better grasp on one of the most ubiquitous tools in a statisticians toolbelt. The book wil be structured largely ...
