04:00
Lucy D’Agostino McGowan
Application Exercise
PorschePrice
data frame04:00
Often referred to as \(\color{#86a293}{r^2}\), it is the fraction of the response variability that is explained by the model.
Application Exercise
\[r^2 = \frac{\textrm{SSModel}}{\textrm{SSTotal}}\]
How could you calculate \(r^2\) if all you had was \(\textrm{SSTotal}\) and \(\textrm{SSE}\)?
01:00
Call:
lm(formula = leaf_length ~ leaf_width, data = magnolia_data)
Residuals:
Min 1Q Median 3Q Max
-12.4544 -3.2196 -0.0287 3.1761 12.6086
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 11.8362 1.3956 8.481 2.36e-13 ***
leaf_width 0.4386 0.1552 2.826 0.00571 **
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 5.327 on 98 degrees of freedom
Multiple R-squared: 0.07537, Adjusted R-squared: 0.06593
F-statistic: 7.988 on 1 and 98 DF, p-value: 0.005707
7.5% of the variation in the length of a magnolia leaf is explained by it’s width.
Application Exercise
appex-12.qmd
summary
on your model predicting Porsche price from mileage03:00