Data Analytics, Machine Learning, Business Analytics, Regression Analysis, Knowledgebase Analytics.
lm(), residual plots can be generated to assess the model’s fit and identify any potential problems. # Fit a linear model based on wt and hp. linear_model <- lm(mpg ~ wt + hp, data=mtcars) # output: # Adjusted R-squared: 0.8148 # F-statistic: 69.21 on 2 and 29 DF, p-value: 9.109e-12 # Residual plot