[R] WLS regression, lm() with weights as a matrix

Victor11 Yao.Zhao at invesco.com
Fri Jul 15 17:03:48 CEST 2011


Dear All,

Now I am thinking to use a for loop:

  for (i in 1:200) { /Results/ <-lm(R[,i] ~ F, weights=W[,i])}

The thing is, I can get WLS regression coefficients and residuals for each
company each with unique weight, but I am wondering how to easily combine
all coefficients and residuals for ALL companies?

Any suggestions would be greatly appreciated.

--
View this message in context: http://r.789695.n4.nabble.com/WLS-regression-lm-with-weights-as-a-matrix-tp3668577p3670176.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list