# Interpreting GLM with logged variable

For my logistic regression model I have:

glm(reconv ~ -1 + log(precon) + log(age), data = crime, family=binomial)


With the following co-efficients outputted from the summary data:

log(precon) =  1.1196
log(age)   =  -0.4469


Where I have a binary variable for if an individual reconvicts, a continuous variable: number of preconvictions, and another continuous variable: age.

I know how to interpret the model if the variables aren't logged (base e), where we would use the logit function (using the coefficents for the un-logged model)

$$\mathrm{logit}\left( \mu_{i} \right) = \eta_{i} \: \: \: \:\eta_{i} = 0.277\mathrm{precon}_{i} - 0.0416\mathrm{age}_{i}, \: \: \mathrm{for} \: i=1,\ldots,247$$

If for example we were to look at the group of 20 year-olds with 3 pre-convictions, we could use the inverse logit function to find the expected a proportion that will re-offend to be: $$p = \dfrac {e^{0.277(3)-0.0416(20)}}{1+e^{0.277(3)-0.0416(20)}}$$ = 0.49975. In other words, approximately half of the individuals in that group are expected to re-offend.

But how do I interpret the GLM with the logged explanatory variables?

• Why have you used -1+ to remove the intercept from the linear predictor? That is very unlikely to be a sensible thing to do. Mar 19, 2019 at 16:56
• Can precon take on zero values? Taking the log of zero would obviously be problematic. Mar 19, 2019 at 17:02
• @GordonSmyth My age and precon variable were highly significant and the intercept term (given by 0.09604 which is quite close to 0) was highly insignificant with a p-value of 0.838367. I also conducted a likelihood ratio test with a test statistic of 0.02 compared to a critical value of χ21=3.84 which revealed strong evidence to select the simpler model (without the intercept) Also, no precon can not take on 0 values as it starts at 1, since posting this I am thinking that taking the log of the factors is perhaps not a good idea and I'm going to abandon that idea however. Mar 19, 2019 at 23:11
• IMO the intercept is a fundamental component of a regression model like this one and should not be removed even if it is not significantly different from zero. The value of the intercept depends on arbitrary things such as how you code your variables---for example, measuring age in months rather than in years would radically change the intercept. Forcing the intercept to be zero makes the model too special to be believable and of very limited application. Mar 19, 2019 at 23:54

Your model implies that the odds of re-offending are given by $$\frac{p}{1-p} = {\rm precon}^{\beta_1}\times {\rm age}^{\beta_2}$$ where $$\beta_1$$ and $$\beta_2$$ are the regression coefficients and $$p$$ is the probability of re-offending.
BTW, I notice that you removed the intercept from the linear predictor by adding ~ -1 to the formula. I don't agree with the idea of removing the intercept from a model like this just because it happens to be close to zero. IMO the intercept is a fundamental component of a regression model like this one and should not be removed even if it is not significantly different from zero. The value of the intercept depends on arbitrary things such as how you code your variables. For example, suppose you decided to measure age in months rather than in years. If the model included an intercept, then the results would remain unchanged. The regression coefficients for precon and age would be unchanged as would their significance, but the intercept would change to absorb the difference between months as years as measurement scales. In other words, inference is invariant to the measurement scale with the intercept in the model.
With an intercept, the model would become $$\frac{p}{1-p} = \alpha \times {\rm precon}^{\beta_1}\times {\rm age}^{\beta_2}$$ where $$\alpha$$ is $$\exp$$ of the intercept.