-
Notifications
You must be signed in to change notification settings - Fork 32
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
Degrees of freedom with Gaussian model fit via geepack and glmtoolbox #496
Comments
Give me reproducible example(s) please.
|
I'm sorry, I just updated my question, because the original part was irrelevant and I figured it out. But the second part of my question holds - would it be possible to unify them both to return either Inf or residual.df? geepack (for which Inf is returned) has built in residual.df function, so this would save some work. This requires no reproducible example. Just information that geepack uses Inf because it's hardcoded in your procedure, and glmtoolbox uses residual.df() from the lm(). So my question is if it's possible that either both returned the same for consistency or both returned residual.df() (geepack offers it natively). |
No, I need an example so I can see what it does. |
geepack::geeglm.
glmtoolbox::glmgee
Could handling both be unified in that they return same df? It's not needed now, it can wait when you return in July. Just leaving it to not forget about it. |
OK, I made both use
|
Hello,
I noticed a discrepancy between how geepack and glmtoolbox GEE engines are supported by emmeans regarding the degrees of freedom.
glmtoolbox::glmgee
When I look into the
emm_basis.glmgee
I can notice does a trick - assigns thelm
andglm
classes to the result. This enables theemm_basis.lm
(or glm). Now, if the class is lm (or glm but conditional distribution is Gaussian (or gamma) like in my case), thedf.residuals
is returned, otherwise -Inf
.geepack:geeglm
This returns Inf - and this is hardcoded.
I think it would be good to unify the way GEE is handled.
It's even simpler, because the geeglm already offers the
df.residual
component.And the geeglm function assigns also the glm and lm classes:
class(out) <- c("geeglm", "gee", "glm", "lm")
Either way (both return Inf or both return residual df) will be fine, but I think they should be consistent...
The text was updated successfully, but these errors were encountered: