Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1556
News FAQ
Search Home


next up previous contents index
Next: functionfitter.getmodel - Function Up: functionfitter - Tool Previous: functionfitter.getfunctionstate - Function


functionfitter.geterror - Function



Package utility
Module fitting
Tool functionfitter


Recover the error of the fitted parameters


Synopsis
geterror()


Returns
Numeric vector or fail



Description

This function returns the standard errors of the unknowns in the fit.



Example
- include 'functionfitter.g'
- ff := functionfitter()
- x := 1:10
- y := 2 + 3*x
- ff.setdata (x, y)
- ff.setfunction ('p0 + p1*x')
- ff.fit(linear=T)                    # Solution perfect like data
[2 3]
- ff.geterror()                       # Errors 0 as data perfect
[0 0] 
-
- include 'randomnumbers.g'           # Add some noise to data
- r := randomnumbers()
- g := r.normal(0,0.1,10)
- y +:= g;
- ff.setdata (x, y)
- ff.fit(linear=T)                    # Now fit and errors non-perfect
[1.96462 2.98964]  
- ff.geterror()
[0.178235 0.0287251]





next up previous contents index
Next: functionfitter.getmodel - Function Up: functionfitter - Tool Previous: functionfitter.getfunctionstate - Function   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-10-15