Question: Regression with interactions

Say I have a data matrix with one dependent variable and 50 independent variable

The first column is the dependent variable columns my first row has header names of variables say.

Is their way to code such that I can do a Linear regression stepwise such that even interactions terms can be into account and check for a best fit.

As only matlab can do it easily as i  see and it is paid costly software.

If pssible any help kind help. 

If possible some code can be written in maple kind help.

Please Wait...