For a normal linear model with fixed observations and mean coefficients, maximizing over the error variance gives . The maximized negative twice log-likelihood is plus a constant common to the candidate models. Counting the variance as another parameter adds the same penalty two to every model, so the stated criterion is equivalent for comparing them:
The Akaike information criterion balances fit against parameter count; smaller values are preferred. It does not compare models using different response scales or different sets of observations without further adjustment.
Stepwise selection by the Akaike information criterion compares allowed one-term additions and deletions, takes a change lowering the criterion, and repeats until no allowed change improves it. The search direction, initial fit and lower/upper scopes matter. A displayed no-change row represents the current model. The term degrees of freedom show how many coefficients a change removes, the residual sum reflects its fit, and the AIC column determines the selected move. The search is greedy, not a guarantee of the best subset over the entire model space. The software's scope and direction conventions are documented in stat.ethz.ch/R-manual/R-devel/library/MASS/html/stepAIC.html .
Deleting coefficients changes the criterion by
Thus the AIC deletion threshold in a normal linear model is
For a single coefficient, its partial F-test statistic must be below for AIC to favor deletion. At the full 47-observation, 16-coefficient fit this is approximately , corresponding to . Therefore AIC selection is not equivalent to retaining only coefficients with a conventional five-percent p-value.
The final model should be described by its retained terms, signs, conditional effect sizes, uncertainty, residual diagnostics and prediction behavior. A coefficient that survives selection need not identify a causal mechanism, and its ordinary final-model p-value ignores the preceding search. Stability under bootstrap resampling and predictive cross-validation are useful. The absent search trace and final model prevent identifying the actual deletion sequence, final predictors, coefficients, RSS or AIC. The given starting name does not specify any of those facts.
The family-history table contains men, of whom have the response present, giving an overall observed fraction . The unadjusted fractions are with a positive family history and without one. Their crude odds ratio is ; this is not the covariate-adjusted effect from the fitted logistic regression.
The full model has an intercept and nine slopes, hence residual degrees of freedom. The binomial distribution dispersion is fixed at one. Although the software labels coefficient-to-standard-error ratios as t values, here they are asymptotic normal Wald statistics, not statistics with an estimated Gaussian residual variance and an exact Student reference. The full conditional coefficients provide evidence for tobacco, cholesterol, family history, behaviour score and age: their absolute Wald ratios are approximately . The other four ratios are smaller in magnitude, especially alcohol at about . These are conditional associations; a weak adjusted coefficient does not by itself establish absence of an underlying association, and multicollinearity can affect the estimates.
The null deviance is on degrees of freedom and the full residual deviance is on . Their difference has a nominal nine-degree-of-freedom likelihood-ratio test reference for the nine slopes jointly. The absolute residual deviance should not automatically be compared with for the reasons in part (i).
The shown stepwise selection by the Akaike information criterion follows a backward path. For individual binary observations the saturated log-likelihood is zero, so
where includes the intercept. Removing a one-parameter term improves AIC exactly when the increased deviance is less than two. The successive deletions are alcohol, adiposity, blood pressure and obesity. The corresponding values are
At the final step, every remaining single-term deletion increases AIC. This is a local stopping condition of the search, not a proof that it found the best subset among all possible models. Obesity is retained for several steps because its successive deletion costs differ after the other terms are removed; the procedure does not simply sort the initial Wald ratios.
For the selected fit, write for positive family history and otherwise. The fitted linear predictor is
Holding the other predictors fixed, a unit increase multiplies the odds by . In the same variable order, the unit odds ratios are
A ten-year age difference multiplies the fitted odds by , and ten behaviour-score points by . Family history has adjusted odds ratio about , with ordinary fitted-model confidence interval . The intercept is the log odds at zero numerical covariates and absent family history; that extrapolated baseline is not a typical man's risk. Odds ratios are not risk ratios.
The selected model's residual degrees of freedom are , consistent with its six coefficients. All five retained slopes have nominal normal-Wald values below in that model, but these tests and confidence intervals do not incorporate the prior model selection. Its improvement over the intercept-only fit is on five nominal degrees of freedom; it loses only deviance units relative to the nine-slope fit while using four fewer parameters. Selection optimism remains relevant to predictive performance. Check possible nonlinear continuous-predictor effects, influential observations and clinically motivated interactions; assess out-of-sample discrimination and agreement of predicted probabilities with observed frequencies by cross-validation or external data. The printed output alone does not supply those diagnostics, and the selected high-risk male population limits extrapolation to other populations. Nothing here establishes causal effects of these observational predictors.
Write . In this normal linear model, the ordinary least squares criterion is . Differentiating with respect to gives the normal equations for linear least squares, . Full column rank of the design matrix makes invertible, and completing the square proves that the unique minimum is
Since , its sampling distribution is the multivariate normal distribution
Let be the hat matrix. It is symmetric and idempotent with rank , and . The regression residual vector is , so
An orthogonal projection of a Gaussian vector onto the residual space gives . The residual projection and fitted projection have zero cross-covariance, hence are independent because they are jointly normal. In particular, is an unbiased estimator of and is independent of . The maximum-likelihood estimator of instead divides by and is not unbiased.
For the null hypothesis , put . Under that null hypothesis, is standard normal and independent of . Therefore the Student t-test uses
A two-sided level- test rejects when . The denominator is the estimated standard error of the regression coefficient.
The fitted linear regression includes an intercept and three covariates:
Thus , and the residual degrees of freedom are . The fitted conditional mean is
Each slope measures a conditional association with the response while the other two covariates are held fixed. Increasing wind speed by one mile per hour corresponds to a fitted decrease of in the concentration units used. Its standard error is , giving and a two-sided p-value of : evidence of a negative conditional association at the 5% level. The temperature slope is per degree Fahrenheit, with standard error , and p-value . The insolation slope is per langley per day, with standard error , and p-value . Neither of these last two conditional effects is significant at 5%; that does not establish that either true slope is zero. These are associations, not a demonstration of causal effects.
The intercept estimates the mean at zero values of all three covariates. Its value has a large standard error , giving and p-value . The zero-covariate combination may be outside the observed range, so this test may have little practical relevance. Every coefficient test uses a Student t-distribution with degrees of freedom.
The reported residual standard deviation measures unexplained variation in concentration units; the subsequent table gives , consistent with after rounding. The five-number residual summary describes the spread, from to , with median . An intercept forces the residual sum to zero, not the residual median. These five numbers alone cannot establish normal errors, constant variance or independence; residual-versus-fitted and quantile-quantile plots would be more informative, and successive days also warrant checking serial dependence. The coefficient of determination means that 65.33% of the sample response sum of squares about its mean is explained by this fit. Its adjusted version is
which accounts for the number of estimated regression coefficients.
The stepwise selection by the Akaike information criterion searches between the intercept-only model and the specified model with all three main effects. For these Gaussian fits, the printed Akaike information criterion is, up to a constant common to the candidates,
The full model has and AIC . Removing insolation increases the residual sum of squares by but decreases AIC to , so that removal is chosen. Removing temperature or wind instead would give AIC or and is worse. In the next step the candidate models include deletions and restoration of insolation. Keeping wind and temperature has the smallest AIC: removing temperature gives , restoring insolation gives , and removing wind gives . Hence the search stops, giving
The accompanying F-tests compare a larger model with a one-parameter reduction: , where is estimated from the larger model. For example, removing insolation gives , equal to the corresponding squared test statistic. Deletions from the second-stage model use in the denominator, whereas restoring insolation uses the full-model denominator. These tests describe the comparisons; they do not determine the AIC choice. In particular, temperature is retained despite its deletion-test p-value . AIC balances fit and complexity, and a stepwise optimum need not be a global optimum over a richer model class. Ordinary coefficient inference after choosing a model does not account for the selection itself.
For positive responses, the Box–Cox transformation is for , and . Its profile likelihood refits the linear regression and variance at each and includes the transformation Jacobian. The graph peaks at roughly –. The approximate 95% likelihood-ratio confidence interval contains values a little below zero through approximately one, using the cutoff . Thus a logarithmic transformation () and a square-root transformation () are plausible, while leaving the response on its original scale () is at or very near the upper confidence boundary. The broad profile supports considering a mild power transformation; it does not determine a sharply estimated power. The raster does not justify more precise endpoints or a decisive assertion about which side of the boundary lies.
Let be the flight distance in millimetres for paper level , launch-angle level , design level and replicate , where and . The full factorial design is fitted by the normal linear model
The assumptions are independent errors with a common variance and normal distribution, and the displayed factor-combination mean structure. The corner-point constraints are
and whenever at least one index equals . Thus the eight free mean coefficients are . These treatment coding coefficients are comparisons at the other factors' reference levels, rather than necessarily averaged main effects.
To test the three-factor interaction term, compare the full model with the model retaining all main effects and all two-factor interactions. The null hypothesis is , against a nonzero value. Removing it increases the residual sum of squares by and removes one parameter. With eight residual degrees of freedom, the nested-model F-test gives
There is no evidence that this three-factor interaction is needed. This does not establish that all two-factor interactions vanish: the paper-design interaction is substantial.
The stepAIC command performs stepwise selection by the Akaike information criterion. Its upper scope is the full factorial model and its lower scope is the intercept-only model. Starting from the full model, it compares admissible additions and deletions, preserving the hierarchy of interaction terms, and chooses changes that reduce the Akaike information criterion. With the supplied scope its default search permits both directions. For these Gaussian fits the displayed criterion, up to constants common to all models, is , where counts mean coefficients. The first deletion changes it from to : the small increase in residual sum of squares is outweighed by removing a parameter. This is a greedy model selection procedure, not an exhaustive search or a sequence of fixed-level hypothesis tests. The command's arguments are described in the MASS documentation.
For the selected model, let and . Then
independently between flights. It has no angle term. The maximum-likelihood estimates of its mean coefficients are also obtained by ordinary least squares:
For example, the four fitted means are just the four paper-design cell means, each averaging four flights over the angle levels. With , the variance-covariance matrix of the coefficient estimates is . Its diagonal gives the displayed standard errors; their ratios are , with mm.
The final line of summary(model2.lm) is the joint nested-model F-test of , comparing this four-parameter model with a common mean. Its statistic is
with F-distribution under the fixed-model null and P-value . Thus the selected paper-design terms jointly improve the fit substantially. The coefficient of determination means they account for about of the observed centred variation. These nominal inferential summaries do not adjust for the preceding model selection on the same data.
Using the unrounded fitted means gives
in millimetres. Hence choose the high-performance design with the lighter paper; the fitted model leaves both launch angles tied, with expected distance about mm. A preference for one angle is not supported by this selected model. The strong paper-design interaction reverses the design comparison: the simple design is better on heavy paper, whereas the high-performance design is better on light paper. Consequently a single design effect averaged over paper types would conceal the main result. There is little evidence here for an angle effect, and considerable flight-to-flight variability remains.
Before fitting, inspect raw-distance dot plots for all eight factor combinations, and interaction plots of cell means against design, with separate lines for paper and panels for angle. With only two replicates per cell, showing individual observations is more informative than elaborate box plots. These reveal reversals, spread and possible unusual flights. Afterwards inspect a residual-versus-fitted plot, a Q-Q plot of residuals, a scale-location plot, residuals against each factor and, if recorded, flight order, and Cook's distance for influential observations. Residual patterns by angle would question its deletion, while unequal spread or departures from the normal distribution would question the error assumptions rather than merely demand another mean term.