Regression Functions

confidence(vx, vy, F, b, conf) Takes two real vectors vx and vy of the same length, a fitting function F(x,b) of one variable and arbitrary number of parameters, the values of the parameters as a vector, b, and the desired confidence percentage conf, expressed as a number between 0 and 1, inclusive. Returns a two-column matrix the same length as b. Elements of the first column contains the variance on the value of each parameter. The first element of the second column contains the percent point function value of the t distribution used to calculate the intervals. The remaining elements in the second column are zeroes. Adding and subtracting the values in the first column from the parameter values gives the confidence interval for each parameter.

LeastSquaresFit(vx, vy, F, guess, conf, [Stdy], [LBUB], [Acc]) Takes real vectors vx and vy of identical length, a fitting function F(x,b) of one variable with an arbitrary number of parameters, b, a guess vector with one guess value for each parameter, the desired confidence limit conf, expressed as a number between 0 and 1, inclusive. An additional optional vector of standard deviations in y, Stdy, the same length as vy, an optional two-column matrix of lower and upper bounds on the parameters, LBUB, with the same number of rows as guess; and an optional convergence accuracy Acc, may be specified. Returns a three-column matrix, where the first column contains the values for the fitted parameters, and the second and third columns contain the left and right boundaries, respectively, for the confidence interval on the parameters.

Notes:

rationalfit(vx, vy, conf, m, n, [Stdy], [LBUB], [Acc], ["noscale"]) Takes real vectors vx and vy of identical length, the desired confidence limit conf, a percentage expressed as a number between 0 and 1, inclusive, and integer polynomial orders m and n for the top and bottom of the rational function to be fit. An additional optional vector of standard deviations in y, Stdy, the same length as vy, an optional two-column matrix of lower and upper bounds on the parameters, LBUB, with m + n rows, and an optional convergence accuracy Acc, may be specified. If the optional string argument "noscale" is supplied, input data will not be scaled to the range 0 to 1 before calculating. Returns a three-column matrix, where the first column contains the values for the fitted parameters, and the second and third columns contain the left and right boundaries, respectively, for the confidence interval on the parameters.

Notes:

rationalfitnp(vx, vy, conf, m, n, [Stdy], [LBUB], [Acc], ["noscale"]) Identical to rationalfit, but avoids poles in the resulting rational function. The default value for Acc is 10-7.