Scilab Function
Last update : 1/11/2005

multireg - Linear Regression for linear combined functions

Calling Sequence

[a,f] = multireg(X,Y,q,adone)

Parameters

Description

more or less a quite simple linear equation system task. The squared deviations are minimized. Nice feature for this function: The user can determine the coefficients he wants to optimize.

Several possibilities are supported: (1): Global determination of optimal parameters. The complete equation system is solved. (2): The optimal solution is calculated recursevely. The vector Q specifies the sequence.

Examples

x=rand(10,5);
a=[3;4;2;1;8];
y=x*a-3;
[aopt1,f1]=multireg(x,y)
//Now, only coeff. 1,2 and 4 are optimized.
[aopt2,f2]=multireg(x,y,[1,2,4])
// Coeffs 1, 2 and 4 are calculated.
// Coeffs 3 and 5 are set to 10 and 11
[aopt3,f3]=multireg(x,y,[1,2,4],[10,11])

See Also

gaussfit ,  

Authors

Dr. Andreas Geissler geisslea@web.de