Multilinear regression

 Multilinear regression is to fit a model represented by a linear combination of arbitrary functions of x to a set of observed data points.

The basis function Fj(x) most commonly will have the family of integer powers which the regression is based on.


In the code: 

x[] and y[] will be the x and y coordinates of the observed data.

n will be the number of observed data points

sigY[] will be the standard deviations of the observed data.

par will be the number of model parameters

a[] holds the parameters of the model

sigA[] will hold the uncertainties associated with the model parameters.

mert is the value of the Chi-square merit function.

f() is the user function.