+5  A: 

An answer is what exactly you have said (comparing a linear and a non-linear model). e.g.

model1<-lm(yv~xv)
model2<-lm(yv~xv+I(xv^2)) #Even if we restrict ourselves to the inclusion of a quadratic term, there are many curves we can describe, depending upon the signs of the linear and quadratic terms

anova(model1,model2)

Analysis of Variance Table

Model 1: yv ~ xv
Model 2: yv ~ xv + I(xv^2)
  Res.Df    RSS Df Sum of Sq      F Pr(>F)  
1     16 91.057                             
2     15 68.143  1    22.915 5.0441 0.0402 *

The more complicated curved model is a significant improvement over the linear model (p=0.04) so, in that case, we accept that there is evidence of curvature in the data.

gd047
+4  A: 

The RESET (Regression Equation Specification Error Test) was designed for missing regressors, but it us often used in testing non-linearities. Can be found in the LMTEST package -- among many other useful tests. It's very similar to what you are already doing. Alternatively, you could devise a test on recursive residuals to exploit the fact that they may become all positive/negative when ordered by entering non-linear variable.

Robert
+1 applying it on my test data: `resettest(yv~xv , power=2, type="regressor")` gave `RESET = 5.0441, df1 = 1, df2 = 15, p-value = 0.0402`
gd047
There's also `ramsey` function in `LDdiag` package
aL3xa