From 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 Mon Sep 17 00:00:00 2001
From: Joe Hunkeler <jhunkeler@gmail.com>
Date: Tue, 11 Aug 2015 16:51:37 -0400
Subject: Repatch (from linux) of OSX IRAF

---
 math/nlfit/doc/nlerrors.hlp | 67 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 67 insertions(+)
 create mode 100644 math/nlfit/doc/nlerrors.hlp

(limited to 'math/nlfit/doc/nlerrors.hlp')

diff --git a/math/nlfit/doc/nlerrors.hlp b/math/nlfit/doc/nlerrors.hlp
new file mode 100644
index 00000000..3b463c14
--- /dev/null
+++ b/math/nlfit/doc/nlerrors.hlp
@@ -0,0 +1,67 @@
+.help nlerrors Feb91 "Nlfit Package"
+.ih
+NAME
+nlerrors -- compute the fit statistics and errors in the parameters
+.ih
+SYNOPSIS
+nlerrors[rd] (nl, z, zfit, w, npts, variance, chisqr, errors)
+
+.nf
+pointer		nl		# curve descriptor
+real/double	z[npts]		# array of input function values
+real/double	zfit[npts]	# array of fitted function values
+real/double	w[npts]		# array of weights
+int		npts		# number of data points
+real/double	variance	# the computed variance of the fit
+real/double	chisqr		# the computed reduced chi-square of the fit
+real/double	errors[*]	# errors in the fitted parameters
+.fi
+.ih
+ARGUMENTS
+.ls nl     
+Pointer to the curve descriptor structure.
+.le
+.ls z   
+Array of function values.
+.le
+.ls zfit  
+Array of fitted function values.
+.le
+.ls w
+Array of weights.
+.le
+.ls npts
+The number of data points.
+.le
+.ls variance
+The computed variance of the fit.
+.le
+.ls chisqr
+The computed reduced chi-squared of the fit.
+.le
+.ls errors
+Array of errors in the computed parameters.
+.le
+.ih
+DESCRIPTION
+Compute the variance and reduced chi-squared of the fit and the
+errors in the fitted parameters.
+.ih
+NOTES
+The reduced chi-squared of the fit is the square root of the sum of the
+weighted squares of the residuals divided by the number of degrees of freedom.
+The variance of the fit is the square root of the sum of the
+squares of the residuals divided by the number of degrees of freedom.
+If the weighting is uniform, then the reduced chi-squared is equal to the
+variance of the fit.
+The error of the j-th parameter is the square root of the j-th diagonal
+element of the inverse of the data matrix. If the weighting is uniform,
+then the errors are scaled by the square root of the variance of the data.
+
+The zfit array can be computed by a call to the nlvector[rd] routine.
+The size of the array required to hold the output error array can be
+determined by a call to nlstati.
+.ih
+SEE ALSO
+nlvector,nlstat
+.endhelp
-- 
cgit 

