AIC results for model selection are dependent on the sample size. For example if I make this model with a sample size n=100:
set.seed(123)
N <- 1000
n <- 100
r2 <- .01
y <- rnorm(n)
AIC.mod0 <- AIC(glm(y ~ 1))
> AIC.mod0
[1] 268.5385
BIC.mod0 <- BIC(glm(y ~ 1))
> BIC.mod0
[1] 273.7488
res <- replicate(N, {
x <- y * sqrt(r2) + rnorm(n, sd=sqrt(1-r2))
list(aic = AIC(glm(y ~ x)),
adj.r2 = summary(lm(y ~ x))$adj.r.squared)
}, simplify=F)
> summary(sapply(res, "[[", "adj.r2"))
Min. 1st Qu. Median Mean 3rd Qu. Max.
-0.0102041 -0.0076633 -0.0009994 0.0077916 0.0162644 0.1411315
> summary(sapply(res, "[[", "aic"))
Min. 1st Qu. Median Mean 3rd Qu. Max.
254.3 267.9 269.6 268.7 270.3 270.5
> summary(sapply(res, "[[", "bic"))
Min. 1st Qu. Median Mean 3rd Qu. Max.
262.1 275.7 277.4 276.5 278.1 278.4
We can see that adjusted $R^2$ is a bit over-corrected but is nevertheless positive. AIC is higher than in the null model so it suggests that adding the variable x as a predictor does not improve the model (the same for BIC).
But if I make the same experiment with a sample size n=1000:
set.seed(123)
N <- 1000
n <- 1000
r2 <- .01
y <- rnorm(n)
AIC.mod0 <- AIC(glm(y ~ 1))
> AIC.mod0
[1] 2824.197
BIC.mod0 <- BIC(glm(y ~ 1))
> BIC.mod0
[1] 2834.013
res <- replicate(N, {
x <- y * sqrt(r2) + rnorm(n, sd=sqrt(1-r2))
list(aic = AIC(glm(y ~ x)),
bic = BIC(glm(y ~ x)),
adj.r2 = summary(lm(y ~ x))$adj.r.squared)
}, simplify=F)
> summary(sapply(res, "[[", "adj.r2"))
Min. 1st Qu. Median Mean 3rd Qu. Max.
-0.001002 0.005103 0.008727 0.009737 0.013583 0.036300
> summary(sapply(res, "[[", "aic"))
Min. 1st Qu. Median Mean 3rd Qu. Max.
2788 2812 2816 2815 2820 2826
> summary(sapply(res, "[[", "bic"))
Min. 1st Qu. Median Mean 3rd Qu. Max.
2803 2826 2831 2830 2835 2841
Adjusted $R^2$ doesn't move a lot in mean but full model AIC is now clearly lower than null model AIC, suggesting that adding the variable x improves the model. We have the same issue for BIC.
So my question could be: is it correct to reject a more complex model based on AIC knowing that a simple sample size increase could make the more complex model more efficient?