# Testing nonlinearity given linear fit

After fitting a multiple linear regression model, how do you test that the relationship between the response and the predictions is actually linear? For example, if the true relationship is

y = tanh(x1 + x2) + e


with x1 and x2 uniformly distributed on (0,1) and e normally distributed, but you don't know the generating process, then a linear regression

y = c0 + c1*x1 + c2*x2 + e


can be fit. How do you test whether y has a linear dependence on c1*x1 + c2*x2?

• I personally can sometimes determine this by looking for any obvious pattern in a scatterplot of the residual errors. Sep 11 '19 at 14:07