untidy | R Documentation |
Users who use emmeans functions as part of a pipeline – or post-process those results in some other way – are likely missing some important information.
Your best bet is to display the actual results without any post-processing.
That's because emmeans
and its relatives have their own summary
and print
methods that display annotations that may be helpful in
explaining what you have. If you just pipe the results into the next step,
those annotations are stripped away and you never see them. Statistical
analysis is not just a workflow; it is a discipline that involves care in
interpreting intermediate results, and thinking before moving on.
neur.glm <- glm(Pain ~ Treatment + Sex + Age, family = binomial(),
data = neuralgia)
### The actual results with annotations (e.g. ests are on logit scale):
emmeans(neur.glm, "Treatment")
### Post-processed results lose the annotations
if(requireNamespace("tibble")) {
emmeans(neur.glm, "Treatment") |> tibble::as_tibble()
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.