# How are the p-values of the GLM in R calculated?

I have been running some binomial logistic regressions in R on a data set and I realised that the p-values of the estimated coefficients are not computed based upon a Normal distribution. For e.g. I have the following result from the glm() function:

    Coefficients:

Estimate Std. Error z value Pr(>|z|)
(Intercept)                    -1.6127     0.1124 -14.347  < 2e-16 ***
relevel(Sex, "M")F             -0.3126     0.1410  -2.216   0.0267 *
relevel(Feed, "Bottle")Both    -0.1725     0.2056  -0.839   0.4013
relevel(Feed, "Bottle")Breast  -0.6693     0.1530  -4.374 1.22e-05 ***


I previously thought that the beta hats (estimated coefficients) are asymptotically normal and the p-value should be calculated using the normal distribution. But it seems from the p-values here that a t-distribution is used to compute them (I think).

I know that the asymptotic condition does not hold when sample size is small but if so, what is the process that causes the estimator to be distributed with a Students distribution? And how do I find out the degrees of freedom for such a distribution?

-0.3126/ 0.1410 =  -2.217021

• @JitendraKulkarni ; yes - your formula is correct (see summary.glm which uses 2 * pnorm(-abs(tvalue)) as in your comment) . But you could also use lower.tail=FALSE depending on the sign; 2*pnorm(-2.216) is the same as 2*pnorm(2.216, lower.tail=FALSE) ) – user20650 May 21 '17 at 22:13