skembel / picante

R tools for integrating phylogenies and ecology

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bug in `pblmpredict` when argument `predict.originals` is TRUE

guiblanchet opened this issue · comments

After perusing the code of the function, I found that on L24 an object V is used but it is never defined. Maybe this a good starting point ?

After taking a deeper look into the code of pblmpredict, I found that the problem can be solved by adding on L18 the following line of code :

V <- kronecker(x$phylocovs$V2,x$phylocovs$V1)

This needs to be validated my reading of Helmus and Ives and my understanding of the code suggest that this is the way to go.

Thanks for reporting this. Your solution seems reasonable to me. I'm pinging @mrhelmus about this as well since he wrote the function.

Your proposed code seems correct to me based on my reading of Helmus & Ives, and so I have incorporated this into the pblmpredict code. This will be incorporated in picante versions >= 1.8.2.