avehtari / ROS-Examples

Regression and other stories R examples
https://avehtari.github.io/ROS-Examples/
323 stars 257 forks source link

p.147 - weighted regression definition #122

Closed rs4606 closed 1 year ago

rs4606 commented 1 year ago

Hi,

I think there's a typo in the definition of weighted regression at the bottom of p.147. Specifically, I think that in the very last line on the page, either W should be the inverse of the weight matrix (so W = diag(1/w_i), not W = diag(w_i)). Alternatively, in equation 10.6, W^{-1} could be replaced by W.

Thanks,

Ravi

avehtari commented 1 year ago

Thanks! You are right. In 10.6 W can be considered to be a covariance matrix. Higher weight of an observation corresponds to higher precision (inverse variance) of that observation, and thus the diagonals of W should be the inverse weights. The online version and errata have been updated.