3

The original model gives me an AIC of 75.43 and the Box-Cox transformed model gives me -189.2013. Does this me the Box-Cox transformed model is a much better model here?

Richard Hardy
  • 54,375
  • 10
  • 95
  • 219
lusicat
  • 681
  • 1
  • 10
  • 20
  • 1
    Did you include the geometric mean as described at https://en.wikipedia.org/wiki/Power_transform#Definition? Only then are the AIC-values compareable. – Jarle Tufto Dec 21 '16 at 15:06
  • fit = lm(mor^0.1818182~x) My model ended up giving me a lambda of 0.1818182. – lusicat Dec 21 '16 at 15:09
  • 3
    You need to use the complete formula in wikipedia, otherwise you're comparing the likelihood of a model specifying the distribution of `mor` with a model specifying the distribution of `mor^0.1818`. These are not compareable. Using the complete formula, you get comparaable likelihoods and you'll probably see a much smaller difference in log likelihoods and AICs. – Jarle Tufto Dec 21 '16 at 15:18
  • I followed the steps here: http://www.yimizhao.com/single-post/2015/04/10/BoxCox-Transformations-for-Linear-Models-1 – lusicat Dec 21 '16 at 15:27
  • Subtracting one and dividing by $\lambda \text{GM}^{\lambda-1}$ is only a linear transformation so ommiting this (as in the example you link to) does not affect R-square values. To compare maximum log-likelihoods and AICs, however, you need to use the complete formula in wikipedia. – Jarle Tufto Dec 21 '16 at 15:34
  • So if I find my lambda = 0.1818182 ...my new linear regression becomes fit = lm(mor^0.1818182~x) under the Box-Cox transformation. – lusicat Dec 21 '16 at 15:50
  • 2
    Instead of `mor^.18` you need to use `(mor^.18-1)/(.18*exp(mean(log(mor)))^(.18-1))` as your response. – Jarle Tufto Dec 21 '16 at 15:52
  • Ok. Thank you, so the website did not do all this transformation, so my regression becomes lm((mor^.18-1)/(.18*exp(mean(log(mor)))^(.18-1))~x)? – lusicat Dec 21 '16 at 15:54
  • Yes, that's right. – Jarle Tufto Dec 21 '16 at 15:58
  • Umm..this guys on the website has md_best – lusicat Dec 21 '16 at 16:00
  • 2
    ? not sure what this last comment means ? BTW, negative vs positive is a red herring, e.g see http://emdbolker.wikidot.com/faq – Ben Bolker Dec 21 '16 at 16:19
  • From R, md_best – lusicat Dec 21 '16 at 17:11
  • 1
    Some miracle happened...my AIC for all models are positive now!!!!!! – lusicat Dec 21 '16 at 19:17

1 Answers1

6

Generally speaking: Yes, you can compare negative and positive values of AIC, it can happen. There is no reason why AIC should be exclusively non-negative; this has been covered already by some posts here and here.

Having said that, you should not compare AIC values from models with different response values. In that case the (log-) likelihoods calculated correspond to variables from different scales so their comparison can be totally misleading; I discuss this a bit with a bit more detail here.

usεr11852
  • 33,608
  • 2
  • 75
  • 117