add a method for regression analysis