I see a lot of comments here assuming "linear model" means "can't model nonlinearities." Absolutely not the case. Splines can easily take care of that. The "linear" part of linear model just means "linear in the predictor space." You can add a non-linear predictor easily via spline basis (similar/sometimes identical to "kernels" in ML).<p>My series of lm/glm/gam/gamm revelations was:<p>1. All t-tests and ANOVA flavors are just linear models<p>2. Linear models are just a special case of generalized linear models (GLMs), which can deal with binary or count data too<p>3. All linear models and GLMs are just special cases of generalized linear <i>mixed</i> models, which can deal with repeated measures, grouped data, and other non-iid clustering<p>4. Linearity is usually a bad assumption, which can easily be overcome via splines<p>5. Estimating a spline smoothing penalty is the same thing as estimating the variance for a random effect in a a mixed model, so #3 and #4 can be combined for free<p>And then you end up with a generalized additive mixed model (GAMM), which can model smooth nonlinear functions of many variables, smooth interaction surfaces between variables (e.g. latitude/longitude), handle repeated measurements and grouping, and deals with many types of outcomes, including continuous, binary yes/no, count, ordinal categories, or survival time measurements.<p>All while yielding statistically valid confidence intervals, and typically only taking a few minutes of CPU time even on datasets with hundreds of thousands / millions of datapoints.