It would be a simple matter to loop through a data table, and build one's x and y matrices and then perform a regression, using the Linear Regression() function. The decision of what values to place in the 2 matrices would be the item to vary.
Here is the example taken from the Scripting Index, for the Linear Regression() function
Names Default To Here( 1 );
/*Simple Linear Regression: y = intercept + beta * x + error*/
y = [3, 5, 7, 5];
X = [1, 2, 3, 4];
{Estimates, Std_Error, Diagnostics} =
Linear Regression( y, X, <<printToLog );
/*
t_ratio = Diagnostics["t_ratio"];
p_value = Diagnostics["p_value"];
RSquare = Diagnostics["RSquare"];
RSquare Adj = Diagnostics["RSquare Adj"];
*/
Jim