Displaying 1 result from an estimated 1 matches for "coerrel".
Did you mean:
correl
2009 Mar 05
1
hatvalues?
...rg/wiki/Linear_regression I get
residuals = y - Hy = y(I - H)
or
H = -(residuals/y - I)
> fit <- lm(weight ~ repwt)
> h <- -(residuals(fit)/weight[as.numeric(names(residuals(fit)))] - diag(1,length(residuals(fit)), length(residuals(fit))))
This generates a matrix but I cannot see any coerrelation between this "hat-matrix" and the return from "hatvalues".
Comments?
Thank you.
Kevin