Linear Regression Implicit Assumptions ◻️ Dependent variable is continuous. Actual Code Run the linear regression model. Regression-based Forecasting Linear Regression with Principal Components Simple Linear Regression fit <- lm(mpg ~ hp, mtcars) summary(fit) Multiple Linear Regression (w/o Interaction) fit <- lm(Petal.Length ~ Species + Sepal.Length, iris) summary(fit) Multiple Linear Regression (w Interaction) fit <- lm(Petal.Length ~ Species * Sepal.Length + Sepal.Width, iris) #fit <- lm(Petal.Length ~ Species * Sepal.Length, iris) summary(fit) Examine its residual plots. plot(fit, 1) plot(fit, 2) abline(a = 0, b = 0) If required, obtain prediction and/or residuals. iris$predicted <- predict(fit) iris$residuals <- residuals(fit)