PLN-team / PLNmodels

A collection of Poisson lognormal models for multivariate count data analysis
https://pln-team.github.io/PLNmodels
GNU General Public License v3.0
54 stars 18 forks source link

Inconsistency / clarification required between field `fitted` and function `predict` #114

Closed jchiquet closed 8 months ago

jchiquet commented 9 months ago

I am reporting an Issue received by email regarding the inconsistent behavior between fitted and predict, already discussed with Mahendra:

Dear Julien,

I am trying PLN Models, I run the following example code:

data(trichoptera) trichoptera <- prepare_data(trichoptera$Abundance, trichoptera$Covariate) myPLN <- PLN(Abundance ~ 1 + offset(log(Offset)), data = trichoptera, control = PLN_param(covariance = "full"))

But I am bit confusing why do myPLN$fitted and myPLN$predict(newdata=trichoptera, type="response") return different results?

Thank you a lot in advance,

Kind Regards, Khadija Musayeva