# How to interpret the intercept term in a GLM?

I am using R and I have been analysing my data with GLM with Binomial link.

I want to know what is the meaning of the intercept in the output table. The intercept for one of my models is significantly different, however the variable is not. What does this mean?

What is the intercept. I don't know if I am just confusing myself but having searched the internet, there is nothing just saying, it is this, take notice of it...or don't.

glm(formula = attacked_excluding_app ~ treatment, family = binomial,
data = data)
Deviance Residuals:
Min       1Q   Median       3Q      Max
-2.3548   0.3593   0.3593   0.3593   0.3593
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept)                 2.708      1.033   2.622  0.00874 **
treatmentshiny_non-shiny    0.000      1.461   0.000  1.00000

(Dispersion parameter for binomial family taken to be 1)
Null deviance: 14.963  on 31  degrees of freedom
Residual deviance: 14.963  on 30  degrees of freedom
(15 observations deleted due to missingness)
AIC: 18.963
Number of Fisher Scoring iterations: 5

• What is the link function that you specify in glm? Jan 21, 2013 at 12:19
• The intercept is the predicted value of the dependent variable when all the independent variables are 0. Without more information on your model, I can't say whether this is meaningful in your case. Jan 21, 2013 at 12:22

The intercept term is the intercept in the linear part of the GLM equation, so your model for the mean is $E[Y] = g^{-1}(\mathbf{X \beta})$, where $g$ is your link function and $\mathbf{X\beta}$ is your linear model. This linear model contains an "intercept term", i.e.:

$\mathbf{X\beta} = c + X_1\beta_1+X_2\beta_2+\cdots$

In your case the intercept is significantly non-zero, but the variable is not, so it is saying that

$\mathbf{X\beta} = c \neq 0$

$g(\mu) = \ln\left(\frac{\mu}{1-\mu}\right)$

And so with just the intercept term, your fitted model for the mean is:

$E[Y] = \frac{1}{1+e^{-c}}$

You can see that if $c=0$ then this corresponds to simply a 50:50 chance of getting Y=1 or 0, i.e. $E[Y] = \frac{1}{1+1} = 0.5$

So your result is saying that you can't predict the outcome, but one class (1's or 0's) is more likely than the other.

• You scared me at E[Y]=.... :). Thank you for the reply, I do (kind off) understand what you are saying. You said that the intercept is sig. non-zero, but the var. is not, it is p=1.00!? What effect does the variables p-value have on what I can say about the resut? Jan 21, 2013 at 13:52
• If a variables p-value is not small, the one would typically not include that variable in the model. In your case the variable is not even being estimated to have a non-zero value, hence the p-value of 1.00. Basically there is no relationship between "treatment" and "attacked_excluding_app". The absence of relationship is so perfect here that it is almost suspcious, although you have a small dataset. It might be worth visualising your data, and seeing if it is reasonable. Jan 21, 2013 at 14:20
• +1 for answer, (and suggestion in comment that something odd is happening in dataset) although I'd disagree with the opening of your comment "If a variables p-value is not small, the one would typically not include that variable in the model." This is not necessarily so -- often one wants to report the magnitude of a relationship, even if it is not "significant" (and more to the point, if you were interested in modelling a relationship to start with, then a null result is still important to report.) Jan 21, 2013 at 21:45
• @James - very good point, one should always report what variables you tested - I should have been clearer, I merely meant that one would typically not include that variable when trying to use the model to make a forecast (since it would usually mean overfitting). Jan 22, 2013 at 21:10
• @Corone - I'm particulary interested in your comments here about variable in/exclusion and their relation to the thread at stats.stackexchange.com/questions/17624/… Mar 2, 2013 at 1:22

It looks to me like there may be some problem with the data. It is odd that the parameter estimate for the coefficient would be 0.000. It looks like both your DV and your IV are dichotomous and that the proportions of your DV do not vary at all with your IV. Is this right?

The intercept, as I noted in my comment (and as @corone 's answer implies) is the value of the DV when the IV is 0. How was your IV coded? As is, though, the fact that the estimate for the coefficient is 0.000 implies that the IV makes no difference.

Therefore, the intercept of 2.708 is the estimated logit of the DV: that is, $\text{log}(\frac{p}{1-p})$ at all levels of the IV.

• Hi there guys, again thank you for the comments. The data points are almost identical. I am reporting it in a report and have to highlight it nonetheless. This is why the results look odd. With this data (GLM) and other data sets in my reports (GLMM) I am deffinately running (#TEAM2x2x2x2) before I can walk. I think my main problem is knowing what I need to report, do I menton the stats for the intercept or for the IV? Below is my (hopefully more standard) GLMM again with binomial link. Jan 21, 2013 at 15:26
• Generalized linear mixed model fit by the Laplace approximation Formula: Attacked ~ Treatment + Trial + Treatment * Trial + (1 | Bird) Data: data AIC BIC logLik deviance 139.6 153.8 -64.78 129.6 Random effects: Groups Name Variance Std.Dev. Bird (Intercept) 0.87795 0.93699 Number of obs: 128, groups: Bird, 32 Jan 21, 2013 at 15:33
• Fixed effects: Estimate Std. Error z value Pr(>|z|) (Intercept) 3.19504 0.90446 3.533 .000412 *** Treatmentshiny_non-shiny 0.02617 1.26964 0.021 .983558 Trial -1.53880 0.36705 -4.192 2.76e-05 *** Treatment:Trial 0.16909 0.49501 0.342 .732655 --- Signif. codes: 0 ‘’ 0.001 ‘’ 0.01 ‘’ 0.05 ‘.’ 0.1 ‘ ’ 1 Correlation of Fixed Effects: (Intr) Trtm_- Trial Trtmntshn_- -0.712 Trial -0.895 0.638 Trtmnts_-:T 0.664 -0.896 -0.742 Jan 21, 2013 at 15:34

In your case, the intercept is the grand mean of attacked_excluding_app, calculated for all data regardless of treatment. The significance test in the table of coefficients is testing whether it is significantly different from zero. Whether this is relevant depends on whether you have some a priori reason to expect it be zero or not.

For instance, imagine you had tested a drug and a placebo for their effect on blood pressure. For each subject, you record the change in their blood pressure by calculating (pressure after treatment - pressure before treatment) and treat this as the dependent variable in your analysis. You then find that the effect of treatment (drug vs. placebo) is non-significant but that the intercept is significantly > 0 - this would tell you that on average, your subjects' blood pressure increased between the two measurement times. This might be interesting and need further investigation.