-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Offset for Poisson models #453
Comments
Offsets are currently not implemented. Somewhat confusingly some of the constructors take an Can you point me to where you saw offsets in the documentation? I can't find it ... and we don't provide docstring for |
Thank you! I actually didn't see it in the documentation (and I was confused by this). I tried based on the Are there plans to implement an offset? I haven't compared with GLMM packages that do support offsets yet. But when I include the variable I would add as an offset I get coefficients slightly different from 1.0 depending on the dataset, usually between 0.8 and 1.2. I am worried this biases the estimates for the fixed effects I am interested in. Best, |
It's on my todo list now -- I think this is a relatively straightforward change once I figure out / remember where to make it .... Offsets are interesting creatures. If you know for sure that it should be exactly one, then you definitely need an offset. If you aren't sure, then allowing the coefficient to vary freely may be a good idea. That comment applies equally well to GLM and GLMMs, and without a lot more knowledge about your research question and model (and potentially a large amount of domain knowledge), I really don't know what would be best for your data. Allowing it to vary freely will tend to impact the other coefficients. You can see this if you look at |
Thanks Phillip! In my context the constant 1.0 coefficient for the offset is an assumption when we make the experimental design. Briefly, we count molecules from a gene relative to molecules from other genes. Using control experiments it's been found that when there are no experimental conditions the 1.0 coefficient is appropriate. Thanks for the idea of looking at the Regards, |
@vals I think that after #482 is merged offsets should be handled correctly. Please see the last testset in One possible source of confusion is that the value of the deviance for Poisson GLMMs is considerably different than that reported for lme4 fits. I think the value here is correct and the value from lme4 is wrong. |
Thank you! Adding the data table name should be perfectly fine for any application I can think of. |
Hi,
I might be missing something, but there doesn't seem to be any way to provide per-observation constant offsets for the
GeneralizedLinearMixedModel
?The
fit
function supports an argumentoffset
, but it doesn't appear to do anything. (Fitting with and without setting this gives the same result).In the
GLM.jl
package thefit
function forGeneralizedLinearModel
has anoffset
argument that works.How can I add an offset to a Poisson GLMM in MixedModels.jl?
Best,
/Valentine
The text was updated successfully, but these errors were encountered: