[proFit-list] Can I fit a function to data with asymmetric errors?

pro Fit support profit at quansoft.com
Sat Feb 15 15:38:23 CST 2020


Hi Jan,

(note that your message was blocked by the list server because it thinks you are not a subscriber, but I let it go manually because of potential general interest. You might want to subscribe to get access to the list in the future.)

Yes, the absence of a fit algorithm for asymmetric errors is a missing feature. In fact, most standard algorithm for curve fitting do not use asymmetric errors.  

One way around your problem is to use the largest between the two error values when doing the fit, and then confirm that the fitted function is generally on  that side of the data once the fit is finished, and you can also compare the fits obtained when using either the smaller of the two errors or the larger, and then pick the fit that “makes sense”. You could also hand-program a calculation for the squared deviations that checks which side of the data function the function value is and uses a different error value depending on the result, and then use this to compare “fit quality” between the various results.

The other way around the problem is to use your own hand-programed squared deviation function that contains your simulation function, access your data, and contains if-conditions for using the correct errors to find the sum of the square deviations that needs to be minimized. You would then use the “Optimize…” feature to find a minimum that would then correspond to the optimum set of parameters that fits the asymmetric error data. This might be a bit of an overkill if you get satisfactory results with the imperfect methods I suggested above.

ivan
—
pro Fit support
profit at quansoft.com


> On Feb 13, 2020, at 4:02 AM, Jan LAGERWALL <jan.lagerwall at uni.lu> wrote:
> 
> Hi all,
> 
> I am fitting an equation to data that has quite large errors at one end of the measuring range and considering the error estimates is essential to getting good results. A problem is, however, that it seems fitting always assumes symmetric errors. My y-values are volume fractions, which obviously cannot be greater than 1, but as I approach volume fraction 1, my estimated errors are on the order of 0.2 or 0.3. This means that a value of 0.9 is considered going from, say, 0.7 to 1.1 during fitting, but of course values greater than 1.0 do not make sense.
> 
> In another data set, I have x-values that I know are lower estimates. In other words, here I would like to set x-error downwards equals zero but the error upwards can be significant. I can plot the data with asymmetric error bars, but I cannot find a way to tell the fitting algorithm to consider asymmetric errors. 
> 
> Am I missing something here, or did I misunderstand something fundamental about how the fitting works, or can I tweak the fitting so asymmetric errors are being considered?
> 
> Thanks a lot!
> /Jan
> 
> 
> 
> Dr. Jan P. F. Lagerwall 
> Professor
> Department of Physics and Materials Science
> 
> Université du Luxembourg
> 
> Campus Limpertsberg
> 162a, avenue de la Faïencerie, BS 1.15a
> L-1511 Luxembourg
> 
> T +352 46 66 44 6219
> F +352 46 66 44 36219
> Jan.Lagerwall at uni.lu <mailto:Jan.Lagerwall at uni.lu> /www.lcsoftmatter.com <http://www.lcsoftmatter.com/>
> physics.uni.lu <http://physics.uni.lu/>, www.uni.lu <http://www.uni.lu/>
> 
> 
> 
> 
> 
> 
> _______________________________________________
> proFit-list mailing list
> proFit-list at quantum-soft.com
> http://quantum-soft.com/mailman/listinfo/profit-list_quantum-soft.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://quantum-soft.com/pipermail/profit-list_quantum-soft.com/attachments/20200215/3f41f2f4/attachment-0001.html>


More information about the proFit-list mailing list