drkowal / lmabc

https://drkowal.github.io/lmabc/
GNU General Public License v3.0
0 stars 0 forks source link

Better fix for the BIC issue #6

Closed prayaggordy closed 2 years ago

prayaggordy commented 2 years ago

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.