Closed rvlenth closed 2 years ago
If understand correctly, what needs to be added is the line
misc = .std.link.labels(object$family, misc)
Could you perhaps confirm this?
It appears that misc
does not yet exist so you need to initialize it; and you need to reference emmeans to find the function. So I think
misc <- emmeans::.std.link.labels(object$family, list())
may work, provided that object$family
is constructed the same way is in glm
.
You also need to ensure that this misc
is included in what is returned.
PS - thought it doesn't have to be like glm
. All you need is something from which you can extract $family
and $link
as strings. For example
> emmeans::.std.link.labels(list(family="binomial", link="logit"), list())
$tran
[1] "logit"
$inv.lbl
[1] "prob"
OK, I have added it to the development version, and I will soon send it to CRAN.
I received an issue related to this package -- https://github.com/rvlenth/emmeans/issues/378. It appears that your emmeans support methods work pretty well, but in a case where you have, say, a binomial family, the returned
emmGrid
object does not "know" that a logit link was used. This created some user confusion.All that is needed is to find the link and include it in the list
misc
returned byemm_basis.MixMod()
. Perhaps looking at the code for similar situations, e.g.,emmeans:::emm_basis.lm
(which also works forglm
models) will be helpful.