SCULIB_FIT_D2XISQ_DAJ2

calculate second differential of chi-squared with respect to a fit parameter

Description:

If status is good on entry this routine will calculate the 2nd order differential of chi-squared with respect to A(J). It does this numerically by calling the supplied routine XISQ_ROUTINE to calculate chi-squared at the current parameter values, then again at A(J)+DELTA_AJ and A(J)-DELTA_AJ, then using the formula:-
2χ2 AJ2 = χ2(AJ + δAJ) 2χ2(AJ) + χ2(AJδAJ) δAJ2 (41)

DELTA_AJ is equal to the absolute value of 0.001 A(J) or, if this is zero, 0.001.

Invocation

CALL SCULIB_FIT_D2XISQ_DAJ2 (XISQ_ROUTINE, N, A, J, D2XISQ_DAJ2, STATUS)

Arguments

XISQ_ROUTINE (XISQ, N, A, STATUS) = EXTERNAL ROUTINE (Given)
name of routine that will calculate chi-squared
N = INTEGER (Given)
the number of parameters in the fit
A(N) = DOUBLE PRECISION (Given and returned)
the fit parameters
J = INTEGER (Given)
the index of the parameter to be varied
D2XISQ_DAJ2 = DOUBLE PRECISION (Returned)
the second differential of chi-squared with respect to A(J)
STATUS = INTEGER (Given and returned)
global status

Copyright

Copyright ©1995,1996,1997,1998,1999 Particle Physics and Astronomy Research Council. All Rights Reserved.