Closed MarcRieraDominguez closed 8 months ago
This happens because both phylolm
and MuMIn
provide their own versions of logLik.phylolm
and logLik.phyloglm
. They aren't compatible because the former is a list object, while the latter uses a numeric vector. Looking at stats::logLik.default
, it seems that MuMIn
follows the convention.
One solution is to update the logLik
(and associated) functions in phylolm
, which should improve it's compatibility with other packages in general. PR #66 implements this.
Thanks @Ax3man for the fix. Although this would be a breaking change as mentioned in #66 but it would make phylolm more compatible with other packages.
Hi! It looks like the
logLik
method implemented byphylolm
reduces compatibility withMuMIn::model.avg()
. Ifphylolm
is loaded afterMuMIn
, it overwrittes thelogLik
method, and themodel.avg(fit = TRUE)
function won't work. Issues with thelogLik
method have been broached before: https://github.com/lamho86/phylolm/issues/56; https://github.com/lamho86/phylolm/pull/55, perhaps changes have not been pushed yet into the latest version?Thank you for developping and maintaining the package!
1st MuMIn, 2nd phlyolm - problematic
Created on 2023-10-09 with reprex v2.0.2
1st phylolm, 2nd MuMIn - works fine
Created on 2023-10-09 with reprex v2.0.2