Zhang Yanwei - Princeton-MRAm
2008-Aug-04 20:39 UTC
[R] Multivariate Regression with Weights
Hi all, I'd like to fit a multivariate regression with the variance of the error term porportional to the predictors, like the WLS in the univariate case. y_1~x_1+x_2 y_2~x_1+x_2 var(y_1)=x_1*sigma_1^2 var(y_2)=x_2*sigma_2^2 cov(y_1,y_2)=sqrt(x_1*x_2)*sigma_12^2 How can I specify this in R? Is there a corresponding function to the univariate specification lm(y~x,weights=x)?? Thanks. Sincerely, Yanwei Zhang Department of Actuarial Research and Modeling Munich Re America Tel: 609-275-2176 Email: yzhang@munichreamerica.com<mailto:yzhang@munichreamerica.com> [[alternative HTML version deleted]]
Zhang Yanwei - Princeton-MRAm
2008-Aug-04 21:06 UTC
[R] Multivariate regression with weights
Hi all, I'd like to fit a multivariate regression with the variance of the error term porportional to the predictors, like the WLS in the univariate case. y_1~x_1+x_2 y_2~x_1+x_2 var(y_1)=x_1*sigma_1^2 var(y_2)=x_2*sigma_2^2 cov(y_1,y_2)=sqrt(x_1*x_2)*sigma_12^2 How can I specify this in R? Is there a corresponding function to the univariate specification lm(y~x,weights=x)?? Thanks. Sincerely, Yanwei Zhang Department of Actuarial Research and Modeling Munich Re America Tel: 609-275-2176 Email: yzhang@munichreamerica.com<mailto:yzhang@munichreamerica.com> [[alternative HTML version deleted]]
Zhang Yanwei - Princeton-MRAm
2008-Aug-04 21:16 UTC
[R] Multivariate Regression with Weights
Thanks. Sincerely, Yanwei Zhang Department of Actuarial Research and Modeling Munich Re America Tel: 609-275-2176 Email: yzhang at munichreamerica.com -----Original Message----- From: markleeds at verizon.net [mailto:markleeds at verizon.net] Sent: Monday, August 04, 2008 5:15 PM To: Zhang Yanwei - Princeton-MRAm Subject: RE: [R] Multivariate Regression with Weights the systemfit package can do that and the documentation is quite nice also. On Mon, Aug 4, 2008 at 4:39 PM, Zhang Yanwei - Princeton-MRAm wrote:> Hi all, > I'd like to fit a multivariate regression with the variance of the > error term porportional to the predictors, like the WLS in the > univariate case. > y_1~x_1+x_2 > y_2~x_1+x_2 > var(y_1)=x_1*sigma_1^2 > var(y_2)=x_2*sigma_2^2 > cov(y_1,y_2)=sqrt(x_1*x_2)*sigma_12^2 > > How can I specify this in R? Is there a corresponding function to the > univariate specification lm(y~x,weights=x)?? Thanks. > > Sincerely, > Yanwei Zhang > Department of Actuarial Research and Modeling Munich Re America > Tel: 609-275-2176 > Email: yzhang at munichreamerica.com<mailto:yzhang at munichreamerica.com> > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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.