![]() I add the age feature, which indicates the percentage of owner-occupied units built prior to 1940 in each town. I fit a linear model to the data but this with using multiple predictors. We will also request the confidence interval. Now let’s try to predict medv with some imaginary values of lstat. ![]() Get confidence intervals for each coefficient, 95% by default. # "fitted.values" "assign" "qr" "df.residual" What components are provided by the model? names(m1) # "coefficients" "residuals" "effects" "rank" ![]() Calling summary provides the p-value for lstat, indicating lstat has a relationship to medv. The coefficient of lstat is negative, as expected. # Residual standard error: 6.216 on 504 degrees of freedom
0 Comments
Leave a Reply. |