Let , , , and . The horizontal axis of the residual-versus-fitted plot is , the fitted values, and the vertical axis is , the regression residual, in millimetres. Under the normal linear model, , where is the regression leverage.
In the quantile-quantile plot, the vertical values are the ordered standardized regression residuals
and the horizontal values are corresponding theoretical quantiles of the standard normal distribution, with plotting positions such as . The exact plotting-position convention has little practical effect here. Under Gaussian errors these points should approximately follow a straight line; they are not independent because fitting induces residual correlations.
The main visible concern is curvature in the conditional mean. The red smooth in the residual-versus-fitted plot descends from positive residuals at low fitted values, becomes negative in the middle, and rises again at high fitted values. This suggests the strictly linear time effects may be inadequate. There is no clear monotone widening of the residual scatter, so strong heteroscedasticity is not apparent. The quantile-quantile plot has modest tail deviations and a few labelled observations, but does not show a dramatic departure from normality. These plots cannot establish independence across days or laboratories; check residuals against day, laboratory, and sampling order as well. A large coefficient of determination does not remove the visible mean-model concern.
The fitted values are , so the hat matrix is
It is symmetric, and
It fixes every vector in the column space of , and annihilates its orthogonal complement. Thus is the orthogonal projection onto that column space, has matrix rank and trace , and is the complementary orthogonal projection. Consequently
Since , the covariance matrix between the regression residual vector and the coefficient estimate is
These quantities have a joint normal distribution, so they are also independent, a stronger conclusion than zero covariance.
Now has mean zero. Using the expectation of a quadratic form,
Thus the maximum-likelihood estimator has
The unbiased alternative is
The orthogonal projection of a Gaussian vector also yields , explaining the residual degrees of freedom.
For the residual-versus-fitted plot, compute fitted values and regression residuals ; the plotted point is .
For the normal Q-Q plot, let be the hat matrix for the full three-column design matrix and let . Form the standardized regression residuals
and order them as . R plots against , where are its plotting positions. For , ; is the standard normal distribution function. This standardization is specified in R's diagnostic-plot documentation.
The original PDF shows a residual cloud around zero without compelling systematic curvature or a clear funnel, and a Q-Q pattern approximately following the reference line. Observations 81 and 83 are conspicuous positive tail points, with a smaller lower-tail departure. The plots show no decisive violation of linearity, constant variance or normality, but the extreme residuals merit inspection. They do not test independence across observations and cannot establish that all model assumptions hold.
With Control as the reference group, the fitted normal linear model has mean
Thus the control-group rate is , while the treatment-group rate is . The estimates are
and
weight units per day. The control slope has and , so there is no statistically significant evidence of weight loss over time in the control group at conventional significance levels.
The plotted regression residuals for each mouse form smooth time patterns rather than an unstructured cloud: nearby observations on the same mouse have similar residuals, and the mice also show persistent individual offsets. This is strong evidence of autocorrelation and omitted mouse-level variation. The ordinary linear model treats all 400 measurements as independent after accounting for cage, so it commits pseudoreplication and will generally underestimate the coefficient standard errors. The reported -tests and -values should therefore not be trusted. A random-intercept linear mixed model with a within-mouse correlation structure would respect the repeated-measures design.
A systematic curved pattern in regression residuals plotted against fitted values suggests a misspecified conditional mean. Positive residuals at both ends and negative residuals in the middle motivate trying quadratic regression. The diagnostic does not by itself identify the error probability distribution or prove heteroscedasticity.
Residual mixture clustering first removes a fitted covariate-dependent mean and then explores latent groups in the regression residuals. It seeks differences relative to the adjustment rather than raw-response differences. Mixture responsibilities express uncertain membership. The fitted mixture alone does not establish distinct real-world populations, and two-stage residual mixture fitting ignores some adjustment uncertainty.
Standardized regression residual Created 2026-10-05 Updated 2026-10-06
In a normal linear model, the th regression residual has variance , where is a diagonal entry of the hat matrix. Replacing by the residual standard deviation gives the standardized residual used in the normal Q-Q plot of R's linear-model diagnostic plots.
Fitting a mixture model to regression residuals treats the fitted mean adjustment as fixed. Even with independent homoscedastic errors, ordinary least-squares residuals have covariance matrix and satisfy fitted linear constraints, so they are not exactly independent observations. A joint mixture regression with shared slopes or a bootstrap of the whole fitting process better accounts for the first-stage estimation uncertainty.