untidy: Dare to be un-"tidy"!

untidyR Documentation

Dare to be un-"tidy"!

Description

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.

Details

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.

Examples

neur.glm <- glm(Pain ~ Treatment + Sex + Age, family = binomial(),
            data = neuralgia)
            
### The actual results, including annotations:
emmeans(neur.glm, "Treatment")

### Post-processed results lose the annotations
if(requireNamespace("tibble"))
    emmeans(neur.glm, "Treatment") |> tibble::as_tibble()


rvlenth/emmeans documentation built on April 29, 2024, 7:28 p.m.