the anova table indicates that the shoe variable explains reasonable amount of the variation in the modelas evidenced by sum of squares contribution of out of + and very small -value after shoe is included in the modelit turns out that the weight variable explains even more of the remaining variabilitywith an even smaller -value the remaining sum of squares ( is of the total sum of squaresyielding reductionin accordance with the value reported in the summary for the ols method as mentioned in section the order in which the anova is conducted is important to illustrate thisconsider the output of the following commands model ols(height weight +shoe"datasurvey fit model fit (table sm stats anova_lm (fitprint table weight shoe residual df sum_sq mean_sq nan pr(> - - nan we see that weight as single model variable explains much more of the variability than shoe did if we now also include shoewe only obtain small (but according to the -value still significantreduction in the model variability confidence and prediction intervals in statsmodels method for computing confidence or prediction intervals from dictionary of explanatory variables is get_prediction it simply executes formula ( or ( simpler version is predictwhich only returns the predicted value continuing the student survey examplesuppose we wish to predict the height of person with shoe size cm and weight kg confidence and prediction intervals can be obtained as given in the code below the new explanatory variable is entered as dictionary notice that the prediction interval (for the corresponding random responseis much wider than the confidence interval (for the expectation of the random responsex {'shoe '[ 'weight '[ ]new input dictionary pred fit get_prediction (xpred summary_frame alpha = unstack (mean mean_se mean_ci_lower mean_ci_upper obs_ci_lower obs_ci_upper dtype float predicted value lower upper lower upper bound bound bound bound for for for for ci ci pi pi model validation we can perform an analysis of residuals to examine whether the underlying assumptions of the (normallinear regression model are verified various plots of the residuals can be