I'm estimating linear panel models with fixed effects in R using plm of the plm-package. As I was looking for ways to compare different models, I came across AIC (Akaike's ‘An Information Criterion’). AIC of the stats-package works according to the documentation for model objects for which a log-likelihood value can be obtained. According to the comments given the OLS-estimator of a linear model is the maximum likelihood estimator. But is this also true for fixed-effects panel models (within-estimator)? Here is a minimal example:
data("Produc", package = "plm") zz <- plm::plm(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp, model="pooling", data = Produc, index = c("state","year")) yy <- plm::plm(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp, model="within", data = Produc, index = c("state","year")) stats::logLik(zz) stats::logLik(yy) stats::AIC(zz) stats::AIC(yy)
Thanks a lot for your help.