comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » CURVFIT with XY error
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: CURVFIT with XY error [message #90200 is a reply to message #90199] Tue, 10 February 2015 11:11 Go to previous messageGo to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Tuesday, February 10, 2015 at 1:33:18 PM UTC-5, rrya...@gmail.com wrote:
> Are you sure your function is nonlinear? I mean, is there any transformation you can apply to force it to be linear?

Things can get a little tricky when the function is non-monotonic. Linear, exponential and power law models are all monotonic, and will work fine with errors in X and Y, but you can also transform those into linear space and use MPFITEXY / FITEXY. This works because the function is single-valued whether it is expressed as y = f(x) or x = g(y).

Once your function has any bumps or wiggles, it's no longer a single-valued function in both x and y. Error bars in the x direction make it ambiguous whether a data point is attached to the left side of a wiggle, or the right side of it. This depends on how sharp the wiggles are, and how small the error bars are.

All this doesn't mean that fitting won't work, but it might mean that the fit converges to a local minimum which is not the global best fit. I.e., extra care is needed.

Craig

P.S. To Phil Brubaker, as already pointed out, the IDL subroutine is called CURVEFIT, and it has existed within IDL since 1982. Good luck with your trademark action.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL array subscripting issue
Next Topic: mpfitfun and complex data

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:32:25 PDT 2025

Total time taken to generate the page: 0.00381 seconds