aboutsummaryrefslogtreecommitdiff
path: root/math/gsurfit/doc/gserrors.hlp
blob: fed9a82ee7cd4fae253220bd88346a3c52c47eac (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
.help gserrors Aug85 "Gsurfit Package"
.ih
NAME
.nf
gserrors -- calculate errors of the coefficients and the chi-square
	    of the fit
.fi
.ih
SYNOPSIS
gserrors (sf, y, weight, yfit, chi_square, errors)

.nf
pointer	sf		# surface descriptor
real	y[ARB]		# array of data values
real	weight[ARB]	# array of weights
real	yfit[ARB]	# array of fitted values
real	chi_square	# chi_square of fit
real	errors[ARB]	# array of errors
.fi
.ih
ARGUMENTS
.ls sf
Pointer to the surface descriptor structure.
.le
.ls y
Array of data values.
.le
.ls weight
Array of weights.
.le
.ls yfit
Array of fitted values.
.le
.ls chi_square
The reduced chi-square of the fit.
.le
.ls errors
The array of errors of the coefficients. The number of coefficients
can be obtained by a call to gsstati.
.le

.nf
	    nerrors = gsstati (sf, GSNCOEFF)
.fi
.ih
DESCRIPTION
GSCOEFF calculates the reduced chi-square of the fit and the standard
deviation of the coefficients.
The chi-square 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. If the weights are equal, then the reduced chi-square is
the variance of the fit. The error of the j-th coefficient is the
square root of the j-th diagonal element of the inverse of the data
matrix. If the weights are equal to one, then the errors are scaled
by the square root of the variance of the data.
.ih
NOTES
.ih
SEE ALSO
gscoeff
.endhelp