Multivariate Regression

#6
You can get the beta hat values from the lm function. Or you can use knowledge of linear algebra to create an X matrix and a Y vector. Then you can do matrix multiplication following the formula from my previous post.