INCLAN Graphics: plot fit

From CYANA Wiki
Revision as of 13:31, 13 August 2009 by Admin (talk | contribs)
Jump to navigation Jump to search

Synopsis

plot fit x y σ f1... (list mode)

Description

Performs a linear least-squares fit of the basis functions given by the vector expressions f1,... to the data points with x-coordinates, y-coordinates and errors given by the vector expressions x, y and σ, respectively. For m basis functions, f1,... ,fm, the optimal linear combination,

y(x) = a1f1(x) + ... + amfm(x)

is determined by minimizing

χ2(a1, ..., am

where i runs over the list data points. The optimal fit function y(x) is added as another column to the list data. This command does not draw anything. The fit parameters, a1,…,am, their standard deviations, 2, and the probability that this value of 2 would be exceeded by chance are available through the intrinsic functions fitpar, fiterr, fitchisq and fitprob, respectively. If the errors i of the data points are unknown, this can be indicated by setting  to zero in the fit command. dot x y1 # plot original data points fit x log(y1) 0 1 x # logarithmic fit of ya1 exp(a2 x) spline x exp(y2) # plot fitted curve