0
$\begingroup$

I am attempting to work out probability of sale (binary variable) via a logistic regression to deal with perfect predictors (separation). I am using a firthlogit command in Stata. When I run the command many of my coefficients are greater than 1, how can this be?

Some example coefficients would be: (coefficent, s.e)

WEEKEND |  -2.034167   1.231037
PRIME   |  -1.268926   1.233
FSQ1    |   6.531973   3.790429
$\endgroup$
  • $\begingroup$ The coefficients are not the same as the fitted values. It is possible for all coefficients to be greater than $1$ in absolute value, yet all fitted values could lie between $0$ and $1$. For instance, in one observation of your example maybe WEEKEND has the value $1$, PRIME equals $1,$ and FSQ1 equals $0.6,$ whence the fitted response would be $0.62.$ This may provide a little more insight than just pointing out that these coefficients are used to fit the log odds of the probability of a response rather than fitting the probability itself. $\endgroup$ – whuber Jul 30 '18 at 13:54
  • $\begingroup$ What's the intercept term? It will be easier to explain with the intercept coefficient shown, as well. $\endgroup$ – Mark White Jul 30 '18 at 13:56
  • $\begingroup$ the intercept is: -0.4733 (s.e. 3.5310) $\endgroup$ – Tom Witten Jul 30 '18 at 14:02
  • $\begingroup$ i understand now that i am getting logistic rather than logit coefficients, i was confused by the command -firthlogit-. i need to know a way to conveniently convert to logit probabilities in stata. ideally i need coefficients bound between -1 and 1 $\endgroup$ – Tom Witten Jul 30 '18 at 14:04
2
$\begingroup$

firthlogit calculates a logistic regression model, for which the coefficients can take any value between -infinity and infinity, as the relation $$ \frac{log(\mathbb{P}[Y=1])}{1-log(\mathbb{P}[Y=1])} = logit(Y_{1/0}) = \alpha + \beta_1 x_1+ ... + \beta_p x_p + \varepsilon $$ applies here. Applying the logit transformation to the outcome is the same as applying the logarithm to the odds of outcome 1 vs. outcome 0 $Y_{1/0}$. In reverse, you apply the exponential function to your coefficients or intercept to receive the odds of the coefficient. For more detail, look here.

$\endgroup$
  • $\begingroup$ Ah thats fantastic- thank you! i don't suppose you would know how to do this directly in stata? $\endgroup$ – Tom Witten Jul 30 '18 at 13:57
  • $\begingroup$ I do not work with stata. But the function 'exp' or something along the line typically does the trick. $\endgroup$ – Alex2006 Jul 30 '18 at 14:21

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.