# AIC calculation in Mathematica

Posted 3 months ago
440 Views
|
2 Replies
|
0 Total Likes
|
 I did not find how Mathematica calculate the AIC criteria in NonLinearModelFiT, but I deduced the formula from the calculated AIC as AIC=k+1 +n (Log[2 Pi RSS/(n-k)]+1) where k is the number of parameter of the fit +1. It seems to me that there is an error with the k+1 because the equation should be AIC=k +n (Log[2 Pi RSS/(n-k)]+1) The extra 1 will be eliminated when taking the AIC difference, but I would like to be able to compute the correct AIC value or to justify the Mathematica values. Does anyone have clues about Mathematica AIC calculation? Answer
2 Replies
Sort By:
Posted 3 months ago
 Hi Stéphane,From the documentation here. "AIC" and "BIC" are likelihood-based goodness-of-fit measures. Both are equal to -2 times the log-likelihood for the model plus k p, where p is the number of parameters to be estimated including the estimated variance. For "AIC" k is 2, and for "BIC" k is log(n). Answer
Posted 3 months ago
 Hi Rohit Thank you for your answer and the link to the documentation. However, this definition does not correspond to the simple formula used by Mathematica to compute the AIC value based on the residual sum of squares of the fit. I cannot refer in my paper to a magical way of calculating the AIC value. Answer