glmGamPoi
glmGamPoi copied to clipboard
[FR] Implement `logLik.glmGamPoi`
For many model classes in R an implementation of the logLik generic is provided. I often use this on holdout data (this usually requires manipulating the fitted object) to compare different models. Thus I would only need REML=FALSE and would appreciate a newdata argument.
Hi Jan,
I like the suggestion. Do you think the function should treat the overdispersion as fixed or would you want the combined likelihood of mean estimates and overdispersion?
Best, Constantin
I am not 100% sure what the model is that is actually fit. I understood that the overdispersion estimates are fixed estimates so they should should only apear on the conditioning part P(new data| coef) where coef are gene means, fixed effects, overdispersion). The size factors are probably harder to deal with...
However, I noticed that a newdata argument is far from standard for
logLikin R (not even for lm and usually requires some hacks to get) I
guess I was spoiled by Stan/Pyro when requesting that.