n dimensional linear regression