Use the normal linear model , with fixed full-column-rank design matrix , independent errors , and . Its log-likelihood is
For fixed , differentiating with respect to gives . Since is positive-definite, the unique least-squares estimate is
Let . The variance score equation is , giving
This is the maximum-likelihood estimator, whereas the residual standard error reported by linear-regression software is . The latter uses the unbiased residual estimate of Gaussian noise variance. These formulas assume and positive RSS; exact interpolation gives a variance-boundary degeneracy rather than an interior maximum.
The regression residual vector is , where is the hat matrix. Both and are symmetric idempotent matrices, and . Therefore and the linear image of a multivariate normal vector gives
This multivariate normal distribution is singular, with rank : fitted-residual orthogonality forces . Specifically, and for distinct observations. Thus regression residuals are generally neither independent nor identically distributed, even though the model errors are. Also and is independent of , which justifies the standard errors and exact Student t-tests below.
In an R formula, I(...) protects ordinary arithmetic from the formula operators: the predictor is the numerical variable , rather than an instruction to remove a formula term. Predictor centering leaves fitted values and the height slope unchanged but places the intercept at a meaningful height. It often reduces the correlation between intercept and slope estimates.
With , treatment contrasts use female as the reference level in a regression factor. The fitted normal linear model is
The estimates and their standard errors are
The intercept estimates female mean weight at height 165. At that same height the male fitted mean is . Holding height fixed, the fitted male mean exceeds the female mean by 4.3294 weight units. Within either sex, one additional height unit increases fitted mean weight by 0.6211 weight units. If height is in centimetres and weight in kilograms, these interpretations use centimetres and kilograms accordingly. A standard error for the male intercept would require the covariance between and , which is not printed.
The prediction equation is . Predictions for individual students also have residual uncertainty, estimated by , beyond uncertainty in the fitted mean.
The additive model gives useful evidence for both predictors. To test for no adjusted sex effect, use against . The statistic has a Student t-distribution with 97 statistical degrees of freedom under the normal linear model and the null hypothesis. Here and . Similarly, against a nonzero common slope gives under the null hypothesis, with . Thus, at a fixed height males have a higher fitted mean weight, and within sex greater height is associated with greater weight.
The interaction model adds . Its female height slope is and its male height slope is . Test against using under the null hypothesis, or equivalently . The -value is 0.73139. The additive model is a reasonable parsimonious choice; the data give no evidence for different height slopes between sexes. This does not establish exact equality of population slopes. The additive model also has the higher adjusted coefficient of determination, 0.405 versus 0.3996, and a slightly smaller residual standard error.
Ignoring sex gives a height slope of 0.8769, appreciably above the adjusted slope 0.6211. This is omitted-variable bias in the descriptive regression: a taller group with a larger intercept makes the pooled height association steeper. Algebraically, with ,
The printed estimates imply a positive height-sex covariance. Pooled and adjusted slopes therefore describe different comparisons; the difference is not evidence that adding sex changed a physical effect of height. For predictions, retain both sex and height, check regression diagnostics, and assess performance on new students. The residual standard error near 5.7 remains substantial and the coefficient of determination near 0.42 does not promise precise individual prediction.
The largest positive regression residual divided by the residual standard error is about , , and in the three models. In comparison, the most negative regression residual is only about two residual standard errors below zero. At least one observation is much heavier than its fitted value, even after adjusting for sex and height.
A standardized regression residual is , so the regression leverage adjustment can make these ratios larger. The maximum is selected among 100 correlated regression residuals, however; it is not a prespecified single standard-normal observation. These summaries do not give a formal regression outlier test or identify which student is extreme. Ask to check the measurement and data entry, examine residual plots and a normal quantile-quantile plot, and inspect regression leverage and influential observations. A valid observation might reveal a heavier-tailed error distribution, an omitted predictor, or a nonlinear relation. Do not remove it solely because it is unusual, and do not infer from the three summaries alone that all three maxima belong to the same student.

Articles by others on the same topic (0)

There are currently no matching articles.