Model comparison with AIC based on different sample size Let's assume I have two models M1 and M2:
M1:  y ~ x1 + x2 + x3
M2:  y ~ x1 + x2 + x3 + x4

Since variable x4 has some missing values the sample size of M2 is lower than sample size of M1: n2 < n1.
Is it still admissible to use AIC to compare models based on different sample sizes?
 A: All the information criteria are based on likelihood function, which in its turn depends on sample size. The larger sample size is, the smaller likelihood becomes and as a result the greater IC becomes. So, you should expect that with the increase of sample size, IC will increase as well (whatever criteria you use). This means that you cannot compare different models fitted on different sample sizes using any information criteria.
BIC has a different penalty than AIC and AICc ($\log(n)k$ instead of $2k$) but it is still based on likelihood function and suffers from the same problem.
As for AICc, this is an unbiased estimate of AIC that can be used on small samples. Once again, it does not allow to compare models on different sample sizes for the same reason as described above. It is just more reliable than AIC when you work with small samples and large number of parameters.
A: A commonly used formula for AIC is AIC = n*ln(RSS/n)+2k, where n is sample size, RSS is regression sum of squares, and k is number parameters (Legendre and Legendre, Numerical Ecology 2012). It can be adjusted for small sample size, as above mentioned. RSS is calculated as RSS = sum[(y_est-y_mean)^2]. Independence of observations, normality of residuals, and homogeneity of residual variances are assumed. The Legendre text at one point states,..."AIC is used to compare models of the same response data,..." and many online sources say y data needs to be the same as well. I didn't see anyone explain why. However, If one were to take additional samples, the above formula implies AIC could go up or down simply by adding those additional samples (as Giordano pointed out). Intuitively, that does not seem appropriate, and so it also seems inappropriate to compare models with different sample size.
A: There is AICc, which is AIC with a correction for sample size:
AICc = AIC + 2k(k + 1)/(n - k - 1)

where ''n'' denotes the sample size and ''k'' denotes the number of parameters.
I think AICc can be used to compare models based on different sample sizes.
A: My rule of thumb is to use BIC instead of AIC when sample sizes are different. AIC is still admissible, the log likelihood input indirectly accounts for different sample sizes.
