Linear Model
Fits a linear regression model using Ordinary Least Squares (OLS).
data (DataFrame): The data to
use.
formula (Formula): The model
formula (e.g., mpg ~ wt + hp).
weights
(Vector[Float] | List[Float]): = NA Optional non-negative
observation weights for weighted least squares.
A model object containing coefficients, residuals, and statistics.
model = lm(mtcars, mpg ~ wt + hp)
summary(model)