Can you calculate a AIC value using the non-linear maximization (nlm) minimum value in R?

So the formula for AIC is: AIC = 2k - 2ln(L) L is the maximized value of the likelihood function.

I'm modeling oxygen data in R using Non-Linear Minimization (nlm) of a maximum likelihood estimation (mle). By using the minimum command it produces the value of the estimated minimum of the function. This seems to be a rough measure of how well my model fits the data. I'm hoping to use this value as L so I can calculate AIC. Is this even possible? I don't understand very well what the nlm function is actually doing so as to know how well it fits with the likelihood function. Is there a better way to get the maximized value of the likelihood function from nlm?

thanks

• What function are you minimizing exactly? (It doesn't make sense to say you minimize MLE.) – Scortchi Jun 11 '14 at 23:38