In R, when trying to compare non linear models with AIC, you can use the function
AIC on an
nls object, which is the least squares estimates of the parameters of a model obtained using the function
nls. However, in the documentation of the function
AIC, you can read :
"The theory of AIC requires that the log-likelihood has been maximized: whereas AIC can be computed for models not fitted by maximum likelihood, their AIC values should not be compared."
If I'm right, an nls object is not a model fitted by maximum likelihood but by least squares method. In consequence, the obtained values of AIC can not be compared. Why is that ? Should I manually calculate AIC in order to compare models fitted with
nls? Is AIC appropriate for comparing non linear models?