Section 25 MLR: Prediction
Multiple Linear Regression: Prediction
25.1 Prediction from the model
\[ \large fm \leftarrow lm(SBP \sim BMI + Age, \space data=BP) \]
Confidence Interval
\[ \large predict(fm, \space newdata=X, \space se.fit=TRUE, \space interval=`confidence`) \]
Prediction Interval
\[ \large predict(fm, \space newdata=X, \space se.fit=TRUE, \space interval=`prediction`) \]
Call:
lm(formula = SBP ~ BMI + Age, data = BP)
Residuals:
    Min      1Q  Median      3Q     Max 
-8.6030 -2.0345  0.1196  1.9800  6.8630 
Coefficients:
             Estimate Std. Error t value Pr(>|t|)    
(Intercept) -10.83438    6.91013  -1.568    0.118    
BMI           2.33147    0.07108  32.799  < 2e-16 ***
Age           1.09032    0.15678   6.954 1.12e-11 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 2.633 on 497 degrees of freedom
Multiple R-squared:  0.8175,    Adjusted R-squared:  0.8168 
F-statistic:  1113 on 2 and 497 DF,  p-value: < 2.2e-16