Concept Flow - Linear regression (lm)
Start with data
Choose dependent and independent variables
Fit linear model lm(y ~ x)
Calculate coefficients (intercept, slope)
Use model to predict y from x
Evaluate model fit (summary)
End
Linear regression fits a straight line to data by finding coefficients that best predict y from x.