Suppose I fit a generalised linear model with a binary response on multiple predictors with a logit link. When calculating the inverse of logit, I have the following exponential formula: $$\frac{e^{\theta}}{1+e^{\theta}}$$

I have been taught that $\theta$ can be represented by the following $\beta_0+\beta_1x_i$, suppose my predictors are factor, would it make sense to do the following? $$\frac{e^{\theta}}{1+e^{\theta}} = \frac{e^{\beta_0+\beta_1x_i}}{1+e^{\beta_0+\beta_1x_i}} = \\ = \frac{e^{\beta_0+\beta_10}}{1+e^{\beta_0+\beta_10}} \\ = \frac{e^{\beta_0+\beta_1(1)}}{1+e^{\beta_0+\beta_1(1)}} \\ = \frac{e^{\beta_0+\beta_1(2)}}{1+e^{\beta_0+\beta_1(2)}} \\ \vdots$$

Because I cannot calculate the fitted values from this (OR what is the appropriate method to compare fitted values from this?), additionally, would it make sense to take the average of all values x in this case, to have a mean score?

  • $\begingroup$ When you write $\beta_1(1)$ and $\beta_1(2)$, do you mean that $1$ and $2$ are indicators of category $1$ and category $2$, or are those literally the numbers $1$ and $2?$ It does not matter what the code says (it does, but for a separate reason); what do you mean by those numbers? By writing that your predictors are factorial, you imply that your feature $x$ is something like dog/cat/horse/crocodile coded as $1/2/3/4$, which is totally compatible with GLM but does require particular handling. $\endgroup$
    – Dave
    Mar 12 at 21:53
  • $\begingroup$ @Dave Yes, they would be all factorial, however, it may be the case that they're binary so 0, 1. I know they're compatible with GLM, however, is the proposed calculation above the accurate approach? $\endgroup$
    – Emil11
    Mar 13 at 15:12
  • $\begingroup$ What do you mean by them being "factorial"? Could you edit your question to explain what you mean by this notation? $\endgroup$
    – Tim
    Mar 13 at 15:17
  • $\begingroup$ Then what do you mean by $\beta_1(2)?$ $\endgroup$
    – Dave
    Mar 13 at 16:50
  • $\begingroup$ @Dave nothing more than beta_1 multiply 2, whereby 2 is a factor (in R terms). Factorial is misrepresenting the actual explanation here - I shouldn't have used this. $\endgroup$
    – Emil11
    Mar 13 at 16:52


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy