rvlenth / emmeans

Estimated marginal means
https://rvlenth.github.io/emmeans/
340 stars 30 forks source link

Statistical test used to calculate p-values for Poisson regression #483

Closed gevro closed 2 months ago

gevro commented 2 months ago

Hi, I wanted to clarify - what is the correct terminology to describe the statistical test that calculates a p-value for a specific predictor variable in a Poisson regression.

i.e. emmeans(~glm(formula = ...), family=poisson) %>% pairs -> produces p-values. What is the statistical test used to calculate these?

Thanks

rvlenth commented 2 months ago

I don't know how to answer this. People in different fields call it different things. For GLMs you typically obtain a z ratio of the observed difference divided by its asymptotic standard error. It is used to test a null hypothesis that the true difference of means is zero versus a two-sided alternative. And by default with comparisons, a Tukey adjustment is applied to the P values, which are thus right-tail areas of the Studentized Range distribution.

If you need more clarification , I suggest posting a question on CrossValidated

gevro commented 2 months ago

Thank you!

gevro commented 2 months ago

Ok I posted it on CrossValidated, because I also wanted to confirm the default for 'pairs' is a two-sided test.

rvlenth commented 2 months ago

The documentation for summary.emmGrid has a lot of details, including that.

gevro commented 2 months ago

Thanks, but I don't see a default value for 'side' mentioned in that documentation, I just read through it. Maybe I'm missing it somewhere?