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() |
nStdDev is the returned value of the fit standard deviation.
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 to the fit |
|
|
-- Fit the polynomial |
|
-- fetch the standard deviation of the fit |
|
-- list the standard deviation |
CLsqFit class, GetCoefErr, GetCovar
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2024 Mirametrics,
Inc. All Rights Reserved.