weecology / LDATS

Latent Dirichlet Allocation coupled with Bayesian Time Series analyses
https://weecology.github.io/LDATS
Other
25 stars 5 forks source link

add AICc functionality back in #129

Closed juniperlsimonis closed 5 years ago

juniperlsimonis commented 5 years ago
AICc <- function(x, dat){
  ll <- logLik(x)
  np <- attr(ll, "df")
  nd <- dim(dat)[1] * dim(dat)[2]
  AIC <- AIC(x)
  pen <- (2*np^2 + 2*np)/(nd - np - 1)
  AIC + pen
}