summary(do.call(AIC, mods))
df AIC
Min. :3 Min. :153.4
1st Qu.:4 1st Qu.:159.6
Median :5 Median :165.8
Mean :5 Mean :163.1
3rd Qu.:6 3rd Qu.:168.0
Max. :7 Max. :170.2
But this likely isn't what you want. Baptiste has the answer:
my.aic <- function(x) {
x <- do.call(AIC, x)
rownames(x) <- NULL
return(x)
}
my.aic(mods)
## df AIC
## 1 3 170.2094
## 2 5 165.7680
## 3 7 153.4352
This is rather close to:
AIC(mods[[1]], mods[[2]], mods[[3]])
## df AIC
## mods[[1]] 3 170.2094
## mods[[2]] 5 165.7680
## mods[[3]] 7 153.4352