Pinpointing outliers in experimental data: the Hat matrix in Anova for fixed and mixed effects models (Italian Journal of Public Health, 2012)
The Hat (H) matrix and in particular the elements of its principal diagonal (leverages) have a paramount importance in multiple regression analysis in order to pinpoint possible outliers and/or influential points as components of several regression diagnostics. This note presents some features of the H matrix and residuals for ANOVA models of experimental designs. For fixed effects models, the values of the elements of H are discussed in completely randomized, randomized complete block and Latin squares designs. The increasing complexity of the design structure leads to different patterns, with increasing values of the corresponding leverages (hii). For mixed effects models, developments on leverage and residuals for marginal and conditional estimates are illustrated. The application of H matrix and residuals in fixed effects and mixed effects model is shown in a worked example. It is concluded that for H matrix in mixed models, an important role is played by the values of the variances of the random effects and the error term, and, consequently, by their method of estimation. Marginal and conditional studentized residuals provide different information about the data, and thus should be both used for model checking.
Keywords: Outliers; Hat matrix; Anova; Mixed effects model