Linear or polynomial regression
linreg(y,x) [b, Ib, e, s, Is] = linreg(y,x,C,sym,pmax)
two matrices or vectors.
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