This topic is discussed in detail in Chapter 5 of Matt
Newville's
The most important difference is that the summations for chi-square
and the R-factor are over both the real and imaginary parts in
In the sigma
.
Alternatively, a single value for sigma can be entered in the input
file with the keyword sigdat
. If no information about
sigma is provided by the user, then
Using the standard deviation of the residuals as the value of sigma assures that the value of chi-square for any fit will be nearly 1. This is true even in the case of a fit that is obviously poor by visual inspection. If this option for evaluating sigma is used, chi-square is not a valid criteria for ascertaining the quality of the fit. The R factor, however, is independent of the choice of sigma and should be a good criteria for judging a fit.
The merit of using a value of sigma that assures unit chi-square is that the error bars on the variables will be correctly normalized. If the fit is of acceptable quality, than the error bars reported in the log file will be those for a variable that is normally distributed about its best-fit value.
Since there is no signal processing involved in
Whatever evaluation of sigma is used, chi-square is calculated from
the residual at each point weighted by the appropriate value of sigma,
as in Eq. 5.2 of the phit.log
is this chi-square divided by the number of
independent points.
The error bars on the guess values are calculated assuming the fitting
function is normally distributed about the best-fit values. With this
assumption, the error bars reported are one-sigma values for the
variation in the guessed variables. Error bars for the evaluation of
set expressions are also reported in phit.log
. These are
propagated numerically from the error bars in the guessed variables
and include the correlation terms. See page ?? in Bevington's book
for the details of this calculation. Error bars are reported neither
for set expressions that are independent of guessed variables nor for
set expressions that depend on the x-axis.
Please read Chapter 5 of the