.BG
.FN hat
.TL
Hat Matrix Regression Diagnostic
.CS
hat(x, int=TRUE)
.AG x
matrix of independent variables in the regression model
`y=xb+e'.
Can also be the QR decomposition of such a matrix.
.AG int
logical flag, if `TRUE' an intercept term is
included in the regression model.
.RT
vector with one value for each row of `x'.  These values are
the diagonal elements of the least-squares projection matrix
`H'. (Fitted values for a regression of `y' on `x' are `H %*% y'.)
Large values of these diagonal elements
correspond to points with high leverage: see the reference
for details.
.SH REFERENCE
D. A. Belsley, E. Kuh, and R. E. Welsch,
.ul
Regression Diagnostics,
Section 2.1,
Wiley, 1980.
.SA
`qr', `lsfit'.
.EX
h <- hat(longley.x)
.KW regression
.WR
