R – Resolving Conflict Between P-Value and Confidence Interval in Gamma Model

confidence intervalgamma distributionp-valuerstatistical significance

I am trying to fit the Gamma model with link = log in R using the glm function.

Below is the summary of the model:

enter image description here

The p-value for level 2 of modact_3 < 0.05, but the confidence interval for this level includes 0 (The null hypothesis is that the coefficient = 0), which should not includes 0 since the null is rejected (p-value < 0.05).

enter image description here

Could anyone help to explain this conflict? Thanks a lot!

Best Answer

See how you get the message "waiting for profiling to be done..." when you run confint? That is because confint returns profile likelihood confidence intervals, which inverts the likelihood ratio test statistic to find regions where the LRT would fail to be rejected. The p values in summary come from a Wald test. The two methods are almost the same, but can yield small differences. If you want Wald confidence intervals, use confint.default.

I don't see any mention of normality in ?confint, so I can only speculate as to what that post you linked to was referring to (you're better off to comment on that answer directly). The Wald test makes an assumption that the log likelihood is locally quadratic, meaning the likelihood is approximately normal. We make use of this assumption a lot (for instance the asymptotic sampling distribution of the coefficients is approximately normal). So the normality is not about the conditional mean, but rather the likelihood.

You're fine using either method. I would suggest using confint since the confidence intervals are derived from the likelihood function directly as opposed to some approximation which may or may not be appropriate based on the size of data you have. Don't base your decision on one method rejecting the null and not the other, because The Difference Between “Significant” and “Not Significant” is not Itself Statistically Significant.