As per the heading, is it possible to add AIC to some previously computed models based on the stats I have (which include $r^2$, its p-value, $\sigma$ for each variable individually)?

They are all bivariate models, though with some calibration parameters (I know the number of parameters in each model to feed into AIC).


(If that's not enough I also have bivariate linear regression results (parameters for best fit line, including $F$ statistic, and $\sigma$ and $t$ for the gradient and intercept); though I don't think, for a bivariate model in which I don't care about the means, that fundamentally tells me anything different does it?)

  • $\begingroup$ Oh dear, I'd better paste that again (can't find how to edit it!) $\endgroup$ Jun 23, 2014 at 14:22
  • $\begingroup$ The current answers do not contain enough detail. Putting a bounty on this as I'd like to express AIC directly in terms of n, r2 and p(the number of parameters). Frank has given a good initial answer and what I want to know should be a simple variable substitution from that, except that it′s not clear what he means by 'degrees of freedom' − could be p or n-p. $\endgroup$ Jun 23, 2014 at 14:23
  • 2
    $\begingroup$ $AIC = n \cdot ln \left( RSS/n \right) + 2 \cdot k$ where $n$ is number of data points, $RSS$ is residual sum of squares, and $K$ is the number of parameters in the model. This assumes that the inequality $n/K < 40 $ is true, otherwise you want to use corrected AIC, or $AIC_c$. You can get RSS from ($R^2$) if you know the residual sum of squares to the mean, as well as to your fit function. $R^2=1-\frac {RSS_{fit}} {RSS_{mean}}$. Many fit programs provide RSS directly. $\endgroup$ Jun 23, 2014 at 14:32

1 Answer 1


I'm not sure how to exactly get AIC (i.e., which term to add) but you can use the likelihood ratio $\chi^2$ statistic minus twice the degrees of freedom as a substitute in many cases, and $\chi^{2} = - n \times \log(1 - R^{2})$ for a Gaussian model.

  • $\begingroup$ So you are saying $AIC \approx -n log (1-R^2) - 2(DF)$ where $DF = n - p$ and $p$ is the number of parameters in the model? $\endgroup$ Jun 18, 2014 at 12:27
  • $\begingroup$ Can this be used to compare goodness of fit across two models which use different data points? $\endgroup$ Jun 18, 2014 at 13:01
  • $\begingroup$ Hang on - doesn't low $R^2$ therefore imply low $\chi^2$ and hence low AIC? Shouldn't low $R^2$ mean a worse (higher) AIC not better? $\endgroup$ Jun 18, 2014 at 13:29
  • $\begingroup$ And do you mean $log$ or $ln$? $\endgroup$ Jun 18, 2014 at 13:31
  • 1
    $\begingroup$ You want numerator d.f. p not error d.f. n-p-1 $\endgroup$ Jun 23, 2014 at 14:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.