Re: Gamma Variate Curve Fitting [message #35515 is a reply to message #35514] |
Mon, 16 June 2003 10:07  |
Paul Van Delst[1]
Messages: 1157 Registered: April 2002
|
Senior Member |
|
|
Kate wrote:
>
> I have been trying for a week now to fit data to a gamma variate curve
> using the curve fitting algorithms built into IDL. Every time I use
> CurveFit it tells me my data does not converge and every time I use
> SVDFIT my program crashes and exits out of IDL automatically! I made
> sure that my inital guesses were VERY close to the actual test data I
> am using and I'm still stuck. Does anyone have any experience fitting
> this type of non-linear curve using IDL? If I was using anything else
> I would probably use the simplex method but there doesnt' seem to be a
> downhill simplex curve fitting algorithm in IDL. HELP!!!
Go to Craig Markwardt's website and download his MPFIT fitting library:
http://cow.physics.wisc.edu/~craigm/idl/fitting.html
I had a similar problem recently (and I was just fitting a relatively simple polynomial
[non-integer exponents] but I tried all the usual suspects) and when I simply replaced
IDL's CURVEFIT with Craig's MPCURVEFIT all my problems went away...literally. Where
CURVEFIT didn't converge, the MPFIT equivalent did. And where CURVEFIT did converge, the
MPFIT equivalent gave me a better fit! And when I really screwed up the initial fit
coefficient guesses and MPCURVEFIT didn't converge, I got meaningful error output that
allowed me to fix the problem.
If I sound gushy about the MPFIT stuff it's because I am - using that code saved me monthS
of work, and I'm not exaggerating.
I hereby nominate Craig and his software for a special award for services to the
school...I mean, the IDL community. :o)
paulv
--
Paul van Delst
CIMSS @ NOAA/NCEP/EMC
Ph: (301)763-8000 x7748
Fax:(301)763-8545
|
|
|