CLsqFit:GetSigmaFit
The GetSigmaFit method returns the standard deviation of the fit. The value is adjusted for the number of free parameters and the point weights used in the fit.
nStdDev = CLsqFit:GetSigmaFit() |
The standard deviation of the fit is a gross measurement of the precision of the fit to the sample data. You also can assess the precision of each calculated coefficient using the GetCoefErr method or determine the independence of individual coefficients using GetCovar to examine the covariance matrix.
The following script fits a 2x2 polynomial, then retrieves the standard deviation of the fit.
|
-- create a CLsqFit object |
|
-- set 2x2 coefficients to fit a warped plane |
|
-- add a point with x = 3, y = 5, z = 5.15 |
|
-- add more points |
|
-- Fit the polynomial |
|
-- fetch the standard deviation of the fit |
|
-- list the standard deviation |