LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Computing uncertainties of coefficients from fitting functions

Does anyone know of a way to get the uncertainties in the coefficients from the fitting functions in the Advanced Analysis Library?  For example, for the LinFit function I'm looking for the uncertainties of both the slope and the intercept.  For the linear fit, I could just write my own, but I'm also looking for the uncertainties of the coefficients from the PolyFit and the NonLinearFit functions which would be more challenging.  If there was some kind of library I could use that did that it would save me a lot of time.

Thanks in advance!

0 Kudos
Message 1 of 4
(3,188 Views)

Hi,

 

There is no possibility using the NI routines, to my knowledge. The only thing you may do is calculate R^2 using the routine GoodnessOfFit.

 

For the individual error estimates one would need the covariance matrix, which is not availabe in the routines offered by NI.

 

My way out was to buy the Intel Math Library which provides many nice and efficient routines; unfortunately, linking these libraries is not simple (i.e. I failed)

 

Wolfgang

0 Kudos
Message 2 of 4
(3,165 Views)
Thanks for your comments.  Right now I'm looking at calling NIST's DataPlot application from my CVI application.  Not every elegant, but it should work.  Nice part about DataPlot is that it is free to download, use, and redistribute.  I'll also look into the Intel Math Library, but if you couldn't get it linked in CVI I kind of doubt that I could.  
0 Kudos
Message 3 of 4
(3,143 Views)

Here's a LabVIEW implementation of the linear least squares fitting routine from Bevingon & Robinson, 3rd edition, chapter 6, that yields the uncertainties in the fit coefficients.  

0 Kudos
Message 4 of 4
(1,778 Views)