Just realized I implemented AIC/BIC in a kinda stupid way. If you run methods(stats::AIC), you won't see AIC.lm; instead, you'll see AIC.default. This means there is no lm-specific implementation, which suggests we don't need an lmabc-specific implementation. I looked at the AIC and BIC source code and found the method we need to implement: stats::logLik. Now, calling AIC(fit_abc) works, even without AIC.lmabc implemented!
I feel like using the default method when possible is probably preferred, right? Anyway, let me know what you think.
Just realized I implemented AIC/BIC in a kinda stupid way. If you run
methods(stats::AIC)
, you won't seeAIC.lm
; instead, you'll seeAIC.default
. This means there is nolm
-specific implementation, which suggests we don't need anlmabc
-specific implementation. I looked at theAIC
andBIC
source code and found the method we need to implement:stats::logLik
. Now, callingAIC(fit_abc)
works, even withoutAIC.lmabc
implemented!I feel like using the default method when possible is probably preferred, right? Anyway, let me know what you think.