Added the regression formula as a parameter so it can be accessed after the test without debug