venelin / PCMFit

An R-package for maximum likelihood inference of Gaussian phylogenetic models with shifts
https://venelin.github.io/PCMFit
4 stars 2 forks source link

Error in logLik.PCM(X[[i]], ...) #7

Closed Sunkuo-1212 closed 4 years ago

Sunkuo-1212 commented 4 years ago

I ran PCMFitMixed() successfully, but there was an error message when I summary the result(dtsummary):

Error in logLik.PCM(X[[i]], ...) : 
  logLik.PCM:: When calling logLik.PCM on a model object, it should have a k x N numeric matrix a

ttribute called 'X'.

The problem occurred at sapply(listModels, logLik). This error message confused me for a long time. So I uploaded my code and file for your help. PCMfitMixed.zip

venelin commented 4 years ago

This was indeed a bug happening in the special case of a single trait. I've fixed it. Please, pull/reinstall the PCMFit package and try your code again. Please, close the issue if the problem got solved.

Sunkuo-1212 commented 4 years ago

The issue has been resolved! Thank you very much!