Hi, I'm a new user of R - Is this how you construct a hat matrix?

H <- x %*% solve(t(x) %*% x) %*% t(x)
H
colnames(H) = rep('', 11)
round(H,2)

If so can you make them for more than 2 matrices?  Why do you have to use
the 2nd piece of code to round and stuff? Shouldn't it be correct from the
start? 

Thanks for any feedback,

Hyak

--
View this message in context: 
http://r.789695.n4.nabble.com/Hat-Matrix-tp3759728p3759728.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to