daijiang / phyr

Functions for phylogenetic analyses
https://daijiang.github.io/phyr/
GNU General Public License v3.0
30 stars 10 forks source link

need for logLik for family=Poisson #70

Open arives opened 2 years ago

arives commented 2 years ago

For bayes = F, family=Poisson doesn't produce logLik, although family=binomial does. I thought the code was there for the logLik, but I might need to write it.

daijiang commented 2 years ago

Tony, I think family=Poisson already has logLik in the output. Get it with model$logLik

arives commented 2 years ago

Daijiang, I thought so too, but it doesn't, at least not for a dataset I was working on. Also, family=binomial for binary data gave a logLik but not for binomial data.

From: Daijiang Li @.> Reply-To: daijiang/phyr @.> Date: Saturday, January 29, 2022 at 9:25 PM To: daijiang/phyr @.> Cc: "Anthony R. Ives" @.>, Author @.***> Subject: Re: [daijiang/phyr] need for logLik for family=Poisson (Issue #70)

Tony, I think family=Poisson already has logLik in the output. Get it with model$logLik

— Reply to this email directly, view it on GitHubhttps://github.com/daijiang/phyr/issues/70#issuecomment-1025059581, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACYX6LEFORW2EMGDY5ZYQC3UYSVRNANCNFSM5NDFDRUA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you authored the thread.Message ID: @.***>

daijiang commented 2 years ago

Tony, Here are the lines of code for that: https://github.com/daijiang/phyr/blob/master/R/pglmm.R#L936-L954 I think it is included there? No idea why you did not have that. If you can send me an example, I may be able to look at it.