# How are the coefficients computed in multivariable logistic regression in R statistics?

I'm going crazy, because I can't find a simple description how the coefficients are calculated in R statistics in the multivariable logistic regression (and I'm not a mathematician). Are they standardised? So i.e. when I have x ~ y1 + y2 and the coefficient for y1 = 0.2, is this the coefficient in the model when the parameter y2 is 0, the mean of y2 or somehow all the parameters of y2?

Sorry, I'm stuck on this simple question ...

p.s.: I also have an interaction y1:y2 if this changes anything ...

From ?glm you can learn that

The default method "glm.fit" uses iteratively reweighted least squares (IWLS)

But what you really seem to be asking is "are the parameters standardised?". The answer is no. The basic GLM model can be defined with a linear combination

$$\eta = \beta_0 + \beta_1 X_1 + \beta_2 X_2$$

that is passed through the link function $g$:

$$g(E(Y)) = \eta$$

so to obtain fitted values you multiply $X_1$ by $\beta_1$ and $X_2$ by $\beta_2$, sum them up and add $\beta_0$, output of this operation is passed through link function (e.g. logit). You can find some general introduction to logistic regression in here (it focuses on Bayesian estimation but also describes the general model), and about link functions here and here.

There are also $t$ (in lm) or $z$ (in glm) values that are $\beta_1/\mathrm{SE}(\beta_1)$ and $\beta_2/\mathrm{SE}(\beta_2)$ respectively, those values are sometimes called the standardized parameters.

• Okay, I couldn't really imagine it how it works in the formula, but when it's not standardized t makes more sence to me... So the coefficient of y1 is also not the coefficient for the mean of y2, so a "general" coefficient for all the values of y2. Thank you!
– user96406
Nov 27 '15 at 10:23
• A minor correction: standardization (with all of its pitfalls) involves standard deviations, not standard errors. Consistent with what's above, if one were to do standardization (not recommended) it is needed only on the right hand side for logistic regression, because the left hand side is unitless. Nov 27 '15 at 12:39
• @FrankHarrell you're right, this paragraph was taken out of context and misleading.
– Tim
Nov 27 '15 at 12:43
• @Marry if this answers your question you can "accept" the answer (the "v" sign), see stats.stackexchange.com/tour for learning more about how the site works.
– Tim
Dec 2 '15 at 22:05