Y fit error for weighted levenberg marquart algorithm

I am using the weighted levenberg marquard algorith, and I want to calculate the error for each fitted x value. I have a vector of x data, a vector of y data, and a vector of standard deviation of the y data. Each vector has n points. For each data point there were several measurements (at the same value of x), so I calculated the stdev of these y values (at each x value). The wights are 1/ stdev_ymeasured^2.
After performing the fit, how can I calculate the error (or the uncertainty of the fit) for each input value of x. The fit is obviously a smooth line, but the uncertainty should vary along it, both because the weights are not equal and because the residuals at each point are different.
I tried using eqn. 19 from this page: http://people.duke.edu/~hpgavin/ce281/lm.pdf but the dimentions of W are wrong; I assume W is a 1*n matrix, with each entry wi being the weight for each x value. Also, I am total unclear as to what sigma_y^2 is supposed to be. Is there a better/different way to calculate the uncertainty? If this formula is appropriate, what is the matrix W actually supposed to be?
Thanks

1 Commento

Hello, now i'm tring to implement the weighted levenberg marquard algorithm. But i don't know how to add the weight to the fitting program. Can you show the program of weighted levenberg marquard algorithm? Thank you very much.

Accedi per commentare.

Risposte (0)

Richiesto:

il 29 Gen 2013

Commentato:

il 10 Mar 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by