# p-value for nonlinear equation

For example I have vectX and vectY, and I want to know:

1. Which is the better model fitting for my data -- it can be linear, exponential, or parabolic.
2. If my result is significant.

I am doing it like this:

#response exponentiel
expFct2 = function (x, a, b,c)
{
a*(1-exp(-x/b)) + c
}
#response parabola
expFct3 <- function (x, a, b, c)
{
a*x^2+b*x+c
}

model1 <- lm(vectY ~ vectY, data=d)
aic1 <- AIC(model1)

model2 <- nls(vectY ~ expFct2(vectX, a, b, c), data= d,
aic2 <- AIC(model2)

model3 <- nls(vectY ~ expFct3(vectX, a, b, c), data= d,
start = list(a=-1, b=3, c=0))
aic3 <- AIC(model3)

if ((aic1 <= aic2) & (aic1 <= aic3)) print("Model1 is better")
if ((aic2 < aic1) & (aic2 < aic3)) print("Model2 is better")
if ((aic3 < aic1) & (aic3 < aic2))print("Model3 is better")


For example if model1 is better, I am doing summary(model1) and I have p-value to know if my result is significant. And I built my equation from de coeff

But if it is model 2, non linear is better. I'am doing summary(model2) but there isn't p-value. I read that it is normal. So how can I know if my result is significant? I still can built an equation but if it isn't significant...

Is it possible to do cor.test(vectX,vectY) before knowing which is the better model? And if p-value is > 0.05 then I don't need to cheek what is the better model, because it isn't significant?

Also note that your parabola can be fit as a linear model using lm rather than nls. Also note that AIC is defined up to a constant, make sure that the aic methods for lm and nls use the same constant or the comparisons will be meaningless.