Awesome!
Sorry about that, a careless mistake.
Olivier
________________________________
De: Allin Cottrell <cottrell(a)wfu.edu>
Enviado: jueves, 24 de mayo de 2018 01:06:23 p. m.
Para: Olivier Montes Ferrer
CC: gretl-users(a)lists.wfu.edu
Asunto: Re: [Gretl-users] AIC with correction for small samples and for bias
On Thu, 24 May 2018, Olivier Montes Ferrer wrote:
@Allin Cottrell<mailto:cottrell@wfu.edu>
What's your take on this, Allin?
Yes, let's do it; this will add value to the little "criteria"
package. I'll produce a modified version and send it to you for
approval.
One point though: the two formulae you gave, for AICbias and AICc, are
actually mathematically equivalent: there's only one "corrected AIC"
value.
AIC = -2L + 2k
AICbias = -2L + 2k * n/(n-k-1)
AICc = AIC + 2k * (k+1)/(n-k-1)
= -2L + 2k * (1 + (k+1)/(n-k-1))
= -2L + 2k * ((n-k-1+k+1)/(n-k-1))
= -2L + 2k * n/(n-k-1) = AICbias
#Akaike information criterion corrected for bias
AICbias=-2*$lnl + (2*($ncoeff)*$T/($T-$ncoeff-1))
#AIC for small samples
AICc=$aic+(2*($ncoeff)*($ncoeff+1)/($T-$ncoeff-1))
Allin