Linear Modelinghard
0:00.0

In a multiple regression model Y=Xβ+ϵY = X\beta + \epsilon, what is the sum of the diagonal elements (trace) of the hat matrix H=X(XTX)1XTH = X(X^TX)^{-1} X^T for a model with kk predictors and an intercept?