Question: Multiple Regression in Maple plus not impressed by regression command

First of all I must say that I am not particulary impressed by the regression commands (fit and LeastSquares) in Maple.

I find them complicated and I must say quite annoying. You have to have the data in this format, you cannot do that...bla bla bla

I just want to specify the matrix columns with data for the indendent variables and the matrix column with data for the dependent

variable.  No more and no less. Compare the fit and LeastSquare commands to the simplicity and elegance of the

ShapiroWilkWTest in Maple where the output is just like a dream: simple,straightforward and perfect.

If I want to find out if a variable is significant I have to run the below code (which is not particular convenient)

 

restart; with(LinearAlgebra): with(Statistics): with(plots): with(CurveFitting):
YY := [10, 3, 10, 6, 8, 10, 4] :
XX := [5, 2, 5, 1, 4, 2, 1] :
digits := 3 :

w1 := Fit(B1+B2*x, XX, YY, x, output = parametervector) :
w2 := Fit(B1+B2*x, XX, YY, x, output = standarderrors):
 `<|>`(`<,>`(B1 = evalf(w1[1], 3), B2 = evalf(w1[2], 3)), `<,>`(TstatB1 = evalf(w1[1]/w2[1], 5), TstatB2 = evalf(w1[2]/w2[2], 5)), `<,>`(Significant = is(abs(evalf(w1[1]/w2[1], 5)) > 2), Significant = is(abs(evalf(w1[2]/w2[2], 5)) > 2)));
R^2 = Correlation(YY, XX)^2;
q1 := pointplot(XX, YY, color = red, symbol = soliddiamond, symbolsize = 24):
q2 := plot(LeastSquares(XX, YY, v, curve = a+b*v), color = black, thickness = 2):
display({q1, q2}, labels = [X, Y], font = [Times, Roman, 16]) ;

 

also does anyone know how we can do multiple regression Y, X1, X2 in Maple with the fit command ??

for example fi we have the following data:

 

Y := [10, 3, 10, 6, 8, 10, 4]; 

X1 := [5, 2, 5, 1, 4, 2, 1]; 

X2 := [5, 2, 5, 1, 4, 2, 1]

 

Please Wait...