A program for optimal regression analysis