
Last chance! 50% off unlimited learning
Sale ends in
X<-matrix(c(6,-4,1, -4,6,-4,1,-4,6), nrow=3,ncol=3, byrow = TRUE)
covmat <- matrix(rnorm(3 * 3), 3, 3)
H<-hatMatrix(X)
H<-hatMatrix(X, covmat)
diag(H)
Run the code above in your browser using DataLab