Common framework for linear regression