Hi. I noticed that for my data set, AICc was always smaller than AIC. It didn't make sense to me since AICc is AIC plus a penalty. I looked into how information criteria is computed in the code and saw that AICc <- AIC + 2*k*(k+1)/(n-k-1) where n is n <- dim(abund)[1] the number of rows of the abundance matrix.
So, as I understood, if the number of covariates increases, k increases by a lot when the number of species is large. With such a large k the penalty 2*k*(k+1)/(n-k-1) easily becomes a negative value, making models with more parameters almost always "better". Is that right?
Shouldn't n be the number of rows (sample sites) times the number of columns (species)?
Sorry for the late response. I've been thinking about this (and spoken with @JenniNiku), and agree with the correct number of observations being p*n. I have added a "fix" in my newest pull request.
Hi. I noticed that for my data set, AICc was always smaller than AIC. It didn't make sense to me since AICc is AIC plus a penalty. I looked into how information criteria is computed in the code and saw that
AICc <- AIC + 2*k*(k+1)/(n-k-1)
wheren
isn <- dim(abund)[1]
the number of rows of the abundance matrix.So, as I understood, if the number of covariates increases,
k
increases by a lot when the number of species is large. With such a largek
the penalty2*k*(k+1)/(n-k-1)
easily becomes a negative value, making models with more parameters almost always "better". Is that right?Shouldn't
n
be the number of rows (sample sites) times the number of columns (species)?