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!

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 :

and as example the tutorial tutorials/fit/fitLinear2.C … iew=markup


see tutorials/matrix/solveLinear.C