GNOME Bugzilla – Bug 691913
Calculation of leverage
Last modified: 2013-01-18 00:21:44 UTC
I think we need a better calculation of leverage in the regression tool. What we have now throws around large matrices which is wasteful and likely to do bad things to accuracy. If I'm not mistaken we need the diagonal of H = A (AT A)^-1 AT With A = QR, we have H = A (RT R)^-1 RT QT so H ej = A x where x = (RT R)^-1 (RT QT ej) aka RT (R x) = RT (QT ej) Right hand side is trivial to compute and both R and RT are triangular, so the equations are easily solved. No actual matrix inversions or very large matrix products are involved.
08:22 <@gmorten> hmm 08:22 <@gmorten> Are the multiple different definitions of leverage? 08:23 <@gmorten> I can only find one and with that we're supposed to get numbers that sum to the number of parameters in the model. 08:23 <@gmorten> The numbers we calculate do not sum to a integer.
Disregeard comment 1. We now have LEVERAGE which does the computation based on x = (RT R)^-1 (A ej) which is a slight variation of the above.
Created attachment 233707 [details] Test spreadsheet Test sheet. The new calculation doesn't care about MUNIT's restriction.
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.