🧀 BigCheese.ai


Everything is a linear model


This article delves into the idea that many statistical tests can be understood as variations of a linear model, using the R function lm(). It covers how different tests like One-Sample T-test, ANOVA, and Two-Sample T-test can be conceptualized as linear models, offering in-depth mathematical explanations and R code implementations.

  • One-Sample T-test can be performed via lm() function in R.
  • In Two-Sample T-test, lm() provides similar results to t.test().
  • ANOVA can be conducted using lm() instead of aov().
  • Residuals and R2 are important in regression analysis.
  • Regression analysis can be visualized with ggplot2.