Home > freetb4matlab > optim > LinearRegression.m

LinearRegression

PURPOSE ^

general linear regression

SYNOPSIS ^

function [p,y_var,r,p_var]=LinearRegression(F,y,weight)

DESCRIPTION ^

 general linear regression

 [p,y_var,r,p_var]=LinearRegression(F,y)
 [p,y_var,r,p_var]=LinearRegression(F,y,weight)
 
 determine the parameters p_j  (j=1,2,...,m) such that the function
 f(x) = sum_(i=1,...,m) p_j*f_j(x) fits as good as possible to the 
 given values y_i = f(x_i)
 
 parameters
 F  n*m matrix with the values of the basis functions at the support points 
    in column j give the values of f_j at the points x_i  (i=1,2,...,n)
 y  n column vector of given values
 weight  n column vector of given weights
 
 return values
 p     m vector with the estimated values of the parameters
 y_var estimated variance of the error
 r     weighted norm of residual
 p_var estimated variance of the parameters p_j

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 22-May-2009 15:13:00 by m2html © 2003