[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

Sand 1, D-72076 Tübingen, Germany
[Uni logo]


fiterror Source code in fiterror.pro

fiterror

Name
        fiterror
Purpose
        compute two-sided, asymmetric error bars for a chi^2 fit
Category
        function fitting
Calling Sequence
         result=fiterror(x, y, ww, apar, sigmaa,chi2=cchi2, $
                   bounds=bounds, delchi=delchi,toldel=toldel, $
                   debug=debug,intpar=intpar,...)
Input Parameters
          similar to jwcurvefit, see the documentation of jwcurvefit
          for an exhaustive explanation.
          The input-parameter apar is the best-fit vector as returned
          from jwcurvefit, sigmaa is the "uncertainty" (i.e. the
          diagonal elements of the Hessian matrix) as returned from
          jwcurvefit.
Keyword Parameters
           chi2= the (reduced) chi^2 value of the best fit
                 as returned from jwcurvefit
           debug= return tons of debugging information if set.
           intpar= array containing the indexes of all interesting
                 parameters, i.e., those for which the uncertainty
                 is to be computed (note: although the word
                 interesting is used here, this is not to be confused
                 with the notion of "interesting parameters" in chi^2
                 minimization)
           delchi= delta chi^2 to be used for the determination of
                 the uncertainty. default: 1, corresponding to 1
                 sigma errors. Use 2.71 for 90% uncertainty
                 (in general, delchi=chisqr_dvf(1-prob,1) where
                 prob is the probability that the n dimensional
                 parameter space spanned by the uncertainties
                 contains the real value)
           maxtry= maximum number of invocations of jwcurvefit in the
                 determination of ONE error (used to determine
                 non-convergence).
Output Parameters
           a 2 dimensional array containing the error ranges for all
           fit parameters (lower boundary = upper boundary for the
           fixed parameters).
Optional Output

Restrictions

Procedure
           a not very stable combination of a secant method and bisection
Example

Revision History
          Version 1.0, 1999.10.21, Joern Wilms
             (wilms@astro.uni-tuebingen.de), based on previous work by
             JW and input from Mike Nowak
             (mnowak@rocinante.colorado.edu).
          CVS Version 1.4, 2001.02.01, Joern Wilms
             corrected bug occuring when trial starting value was
             outside the bounds
          CVS Version 1.5, 2001.10.07, Joern Wilms
             corrected bug resulting in the code to loop (logical mistake)

Last modified by pro2html on 2005 January 04 at 16:36 UTC

[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]

Jörn Wilms (wilms@astro.uni-tuebingen.de)
Updated automatically