Linear multiple regression

Hello, I would like to know how can I do, with Root,
a Chi-Square minimization with the following terms:

Yi = measured values
Y = AX1,i+BX2,i+CX3,i function to compare to Yi, where the vectors
X1, X2 and X3 are known while the coefficients A, B, C are to be found.

This is called a linear multiple regression and can be evaluated analitically (long but not difficult), but it could be useful for me to know how to obtain the regression with some package in Root.

Thanks a lot!
Elena.

Ciao Elena,

you can use the TLinearFitter class for performing a linear regression (fit) on y(i) data versus 3D x(i) data.

See the documentation of the class at :

root.cern.ch/root/htmldoc/TLinearFitter.html

and as example the tutorial tutorials/fit/fitLinear2.C

root.cern.ch/viewvc/trunk/tutori … iew=markup

Lorenzo

see tutorials/matrix/solveLinear.C