
Line fits and the use of V_rab

chozo
I realized that Line fits do not output a covariance matrix even with /M=2, and a correlation coefficient V_rab is given instead. I have a bit trouble wrapping my head around using this correlation coefficient in error propagation. Is the following correct when calculating the error from a multiplication or division of slope and intercept (e.g., a/b):
NVAR coefCorr = V_rab Wave cw = W_coef Wave sw = W_sigma Variable err = sqrt( (sw[0]/cw[0])^2 + (sw[1]/cw[1])^2 + 2*(coefCorr*sw[0]*sw[1])/(cw[0]*cw[1]) )
Here I 'convert' the correlation coefficient into a covariance-like factor by multiplying with sigma. I am not sure if I make a mistake on the order of sqrt() or x^2.
Why I need this? To generate derived values such as the x-intercept of a line in my Super Quick Fit package, of course. ;)
I would need to think hard about your equations for error propagation, but if it helps you can force generation of the covariance matrix by using a user defined function:
May 10, 2022 at 06:37 am - Permalink
Hi Kurt, thanks a lot for the hint. While I do not want to replicate the Line function (this would introduce some clutter in my package https://www.wavemetrics.com/node/21866 ), I was able to test that my approach is correct:
Which is (almost) equal to:
If this is not just a strange coincidence with this particular data set, then I guess my approach using coefCorr*sw[0]*sw[1] as a replacement for the coefficient matrix is OK. Great.
May 10, 2022 at 07:43 am - Permalink