I am trying to perform non linear regression on my data using nls in R and several different models which I am comparing using AIC to determine the best fitting model.
As an example, I am fitting either a simple exponential equation (model 1):
Y ~ a * exp(b * X)
or an expoential equation with an intercept (model 2):
Y ~ a * exp(b * X)+c
It is clear that, if c=0, we have model 2 = model 1.
In my dataset, for the vast majority of variables, model 2 gives a higher AIC than model 1. This happens because NLS always tries to fit model 2 with c =/= 0.
Is there any way for me to make it so that NLS can set coefficients to 0 (the c coefficient in this case) if that generates the best fitting model?
That way, the number of models I would need to run would reduce significantly.