# Fit the simple linear regression model
model <- lm(`Energy Efficiency (MPG)` ~ Horsepower, data = car_data_clean)
# Output the summary of the model
summary(model)
Call:
lm(formula = `Energy Efficiency (MPG)` ~ Horsepower, data = car_data_clean)
Residuals:
Min 1Q Median 3Q Max
-9.968 -1.966 0.683 1.933 9.241
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 41.270812 1.864643 22.133 < 2e-16 ***
Horsepower -0.053695 0.006956 -7.719 2.68e-09 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 3.689 on 38 degrees of freedom
Multiple R-squared: 0.6106, Adjusted R-squared: 0.6003
F-statistic: 59.58 on 1 and 38 DF, p-value: 2.677e-09
