0

I would like to perform an AIC on a maxnet model.
I run a model using maxnet package in R and I want to perform an AIC on this model.
I tried to use the SDMtune package in R but the class of the maxnet output does not correspond to the class requested by the SDMtune package.
I am not very familiar with the output so it would be great also if AIC can be calculated manually from the maxnet model output.

Example:

library(maxnet)
data("bradypus")

mod <- maxnet(p=bradypus$presence, data = bradypus[-1], 
              regmult =1:3,  # to adjust regularization
              classes = "q")
mod

# apply here AIC or BIC
....
Giordano
  • 81
  • 5
  • `maxnet` makes use of `glmnet`, so you might be able to use the solution provided here https://stackoverflow.com/questions/40920051/r-getting-aic-bic-likelihood-from-glmnet/43746925#43746925. If not I would recommend using the function `aic.maxent` in the `ENMeval` package – FAmorim Jan 12 '23 at 15:32
  • @FAmorim I tried the answer in that question but the resuted BIC is a vector and not a number as I would expect. I admt I am not very familiar with this type of analysis. – Giordano Jan 12 '23 at 15:40

0 Answers0