I've got a linear regression that looks like:
multivariateModel = lm(cbind(y1, y2, y3)~., data=temperature)
I need to do two things with this, which I've found difficult to do. First is to extract the variances, and right now I'm using sigma(multivariateModel), which has returned
y1 y2 y3
31.22918 31.83245 31.01727
I would like to use those 3 sigmas to create variances (sd^2) and weight them against my regression. Currently, weights=cbind(31.22918, 31.83245, 31.01727) is not working, and it's also not working to use matrix 3 columns long with those values repeated.
Here is the dataset in question:
Is there a way to add these as a weighted matrix so that I can get out a fitted model with this, or is there another package I need to use besides lm for this? Thanks.
Here is a link to the dataset: https://docs.google.com/spreadsheets/d/1zm9pPqOnkBdsPekOf8IoXN8yLr82CCFBuc9EtxN5JII/edit?usp=sharing