ddsjoberg / gtsummary

Presentation-Ready Data Summary and Analytic Result Tables
http://www.danieldsjoberg.com/gtsummary
Other
1.05k stars 121 forks source link

Feature request: Two-way ANOVA documentation #1998

Open MauKappel opened 3 weeks ago

MauKappel commented 3 weeks ago

I was looking at a two-way ANOVA analysis and was confused by the p-value in the table. Usually the p-values are reported for the independent variables and not the model p-value. When I looked at the tests documentation I was still confused as it mentioned the lm() call and I was expecting anova() but not broom::glance(). However, it makes sense to do it like this for the format of the table.

https://github.com/ddsjoberg/gtsummary/blob/d9b19522cc195d69322e34a9398d91fac3edda27/data-raw/gtsummary_tests.csv#L45

It may be obvious to others, but I wanted to point out my experience.

Thanks for providing gtsummary, I love using it!

Warm regards, Maurice

ddsjoberg commented 3 weeks ago

Dear @MauKappel thank you for the post and the kinds words!

Reviewing the documentation, I agree that it's not 100% clear which p-value from lm() is being reported.

image

If we provided lm(continuous_variable ~ by + variable) |> broom::glance() for the pseudo code instead, would that be more clear?

MauKappel commented 3 weeks ago

Yes then it would be clear. Thanks!