Skip to content
Prev 382245 / 398502 Next

Computation of r.squared for weighted least squares linear models

Dear Sebastian,

I was able to replicate the R^2 value of 0.993019 using the function provided as the second answer (by Julien Massardier) to the following question - https://stats.stackexchange.com/questions/83826/is-a-weighted-r2-in-robust-linear-model-meaningful-for-goodness-of-fit-analys

Thank you.
Regards,
Anindya
?


Hi,



recently I posted a question about how R computes the value for the 

"r.squared" statistic internally for weighted least squares linear 

models on crossvalidated.com (see: 

https://stats.stackexchange.com/questions/439590/how-does-r-compute-r-squared-for-weighted-least-squares)


including a minimal code example but unfortunately did not get an answer.



I would greatly appreciate if any of you who know the answer could reply 

either here or directly on my post on crossvalidated.



Thanks a lot in advance!