Stixbox Function
Last update : 21/4/2006

linreg - Linear or polynomial regression

Calling Sequence

linreg(y,x)
[b, Ib, e, s, Is] = linreg(y,x,C,sym,pmax)

Parameters

Description

Linear or polynomial regression.

The output b is the point estimate of the parametars in the model

The columns of Ib are the corresponding confidence intervals. The

residuals are in e. The standard deviation of the residuals is s.

A pointwise confidence band for the expected y-value is plotted, as

well as a dashed line which indicates the prediction interval given

x. The input C is the confidence which is 0.95 by default. C = []

gives no plotting of confidence band or prediction band.

Input sym is plotting symbol, with 'o' as default. For polynomial

regression give input pmax a desired value, the model is then