blob: a0a0fbb213f9e7fdaa1e35b6237aaf27db801038 (
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
|
.help cverrors Jun84 "Curfit Package"
.ih
NAME
cverrors -- calculate the standard deviation of the fit and errors
.ih
SYNOPSIS
cverrors (cv, y, weight, yfit, npts, chisqr, errors)
.nf
pointer cv # curve descriptor
real y[] # array of y data points
weight weight[] # array of weights
real yfit[] # array of fitted data points
int npts # number of points
real chisqr # the standard deviation of the fit
real errors[] # standard deviations of the coefficients
.fi
.ih
ARGUMENTS
.ls cv
Pointer to the curve descriptor structure
.le
.ls y
Array of y data points
.le
.ls yfit
Array of fitted y values
.le
.ls npts
The number of points
.le
.ls chisqr
Reduced chi-squared of the fit.
.le
.ls errors
Array of standard deviations of the coefficients.
.le
.ih
DESCRIPTION
Calculate the reduced chi-squared of the fit and the standard deviation
of the coefficients.
.ih
NOTES
The standard deviation 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-squared 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
SEE ALSO
.endhelp
|